Closed TrevorHeyl closed 5 years ago
Could you share the full code you used to read the image until the save process and a link to the image in question? Thanks.
As requested, see here for a project : https://github.com/TrevorHeyl/SOD_TestGrayScaleBMP and here for the images : (same proejct) https://github.com/TrevorHeyl/SOD_TestGrayScaleBMP/tree/master/SOD_test/res The input images are image01...bmp and the output images out...bmp
I have used Codeblocks 17.2 for this project
As you can see the output files are always 172854 bytes in size even if I specify 1 single channel. Notice the one input file of 16bit is 115338K, this corresponds with an image of 240x240x16 bit approx. So I expect the output file to be about 60K for 8 bit grayscale.
Thanks
All right,
you should probably load the image normally (i.e. sod_img_load_from_file(zInput, SOD_IMG_COLOR)
) without forcing on grayscale colorspace conversion like you did and apply the Grayscale conversion later via sod_grayscale_image().
Thanks for the answer.
Hi,
I am trying out some processing with grayscale and black and white images, I find some problems with channel depth in some functions.
I am using Windows 7 and the GNU compiler with Codeblocks as IDE.
When using _sod_img_blob_save_asbmp() with channels set to 1, the output still contains 3 channels. Below is some code I used to test this.
`
sod_img imgIn = sod_img_load_from_file(zInput,SOD_IMG_GRAYSCALE); //
`