I am converting various bmp and jpg files with the command line program âconvertâ to tif files (ImageMagick version 6.2.7). The resulting files look bad in certain viewers and perfect in others. The only issue that I can see is that the files that look bad in certain viewers have Bits/Sample value 16 and not 8. (Files that look good in all viewers are all having Bits/Sample = 8.)
Can and if yes how one can control the Bits/Sample value with the âconvertâ program?
Eventually I would like to do the same or similar step in the C-api with MagickWriteImage (or in MagickConstituteImage), is this possible?
Bits/Sample setting for .tif file conversion/write...
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
The TIFF image format always has problems like this. What will work for one program will not always work for another. I suggest you avoid it.
See IM Examples, Common File Formats, Summery, for details
http://www.cit.gu.edu.au/~anthony/graph ... s/#summary
See IM Examples, Common File Formats, Summery, for details
http://www.cit.gu.edu.au/~anthony/graph ... s/#summary
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
It worked, thank you for the prompt help.
It worked, thank you for the prompt help.
Setting -depth 8 for 'convert' fixed some of the conversion scenarios with which I had problem. Using the api call MagickSetImageDepth(wand, 8 ) enabled our application to correctly handle all the scenarios that we have in our application.
Setting -depth 8 for 'convert' fixed some of the conversion scenarios with which I had problem. Using the api call MagickSetImageDepth(wand, 8 ) enabled our application to correctly handle all the scenarios that we have in our application.