Binary image (1 bit per pixel) c++ API
Posted: 2017-01-14T22:00:10-07:00
Is there an opportunity to construct binary (1bit) images and convert other images to this format using c++ api? I coudnt find any information about this.
Use https://github.com/ImageMagick/ImageMagick/discussions instead.
https://imagemagick.com/discourse-server/
https://imagemagick.com/discourse-server/viewtopic.php?t=31229
I have already seen that and If I correctly understand, depth can be only from 8 to 32 bit, and what about monochrome(), it looks like grayscale transform, so I need exact answerfmw42 wrote: ↑2017-01-14T22:36:20-07:00 I do not program in C++, but see depth and monochrome at https://www.imagemagick.org/Magick++/Image++.html
But the question is vague.bronstein87 wrote:Is there an opportunity to construct binary (1bit) images and convert other images to this format using c++ api? ... so I need exact answer
Ok, I will try, thank you. But, I probably incorrectly expressed, I talking about pixel format, not image. Look at this link: http://doc.qt.io/qt-4.8/qimage.html#Format-enum. So, I am talking about creating image with some pixel format, not image.fmw42 wrote: ↑2017-01-15T00:14:17-07:00 depth can be 1 if the output file format supports it
monochrome converts to black/white (1-bit)
See http://www.imagemagick.org/script/comma ... monochrome
You can also use the equivalent of -type bilevel
Or you can use the equivalent of -threshold to convert to 1-bit result.
All these depend upon whether the image format supports 1-bit; otherwise, though it is only black and white, the type will show as either grayscale or palette.