R
Raj
Hello Members,
I wrote a program to convert a greyscale bitmap image in to monochrome
bitmap image, a simple thresholding.
Input:Greyscale image[1 pixel = 8 bit ie 1 byte = 1 pixel];
Expected Output:Monochrome image[1 pixel = 1 bit]
Pseudocode:
row:0->height
column:0->width
if (current pixel value>Threshold value)
current pixel value = 0;
else
current pixel value = 255;
I am writing back the thresholded values in to the same input buffer.
The problem what i am facing is that i am getting a thresholded image
but in the grey scale image format.
So here i need to write 1 byte as 1 bit. I am stuck here. How can i do
this being my data remains the same but instead of 1 byte, it has to be
1 bit.
Kindly guide me
thanks
Raj
I wrote a program to convert a greyscale bitmap image in to monochrome
bitmap image, a simple thresholding.
Input:Greyscale image[1 pixel = 8 bit ie 1 byte = 1 pixel];
Expected Output:Monochrome image[1 pixel = 1 bit]
Pseudocode:
row:0->height
column:0->width
if (current pixel value>Threshold value)
current pixel value = 0;
else
current pixel value = 255;
I am writing back the thresholded values in to the same input buffer.
The problem what i am facing is that i am getting a thresholded image
but in the grey scale image format.
So here i need to write 1 byte as 1 bit. I am stuck here. How can i do
this being my data remains the same but instead of 1 byte, it has to be
1 bit.
Kindly guide me
thanks
Raj