Hej allihop!
I want to convert a 16-bit tiff image to 8-bit:
this is the information I get about the original image with identify:
original.tiff TIFF 658x486 658x486+0+0 16-bit Grayscale DirectClass 640KB 0.000u 0:00.000
I tried the following command:
convert original.tiff -depth 8 -define quantum:format=unsigned -type grayscale test.tiff
This does not seem to work as the resulting tiff is just black.
I have no clue what could be wrong and be happy about any help!
langstrump
convert 16-bit tiff to 8-bit tiff
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert 16-bit tiff to 8-bit tiff
post a link to your input image and report what version of IM you are using. what happens if you remove the -define?
What are the range of values in your tiff? If very low, then you may need to scale the result. try adding -auto-level to your command line before -depth 8
What are the range of values in your tiff? If very low, then you may need to scale the result. try adding -auto-level to your command line before -depth 8
Re: convert 16-bit tiff to 8-bit tiff
Thanks a lot! I am not familiar with these image manipulation. The -auto-level option actually solved my problem.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert 16-bit tiff to 8-bit tiff
That is because your graylevels did not span the full 16-bit range and in fact were probably very low. When converted to 8-bits they may have been made relatively lower. The auto-level caused the input values to stretch to span the full 16-bit dynamic range so that when converted to 8-bits they still spanned the full dynamic range.langstrump wrote:Thanks a lot! I am not familiar with these image manipulation. The -auto-level option actually solved my problem.