Page 1 of 1

-depth 8 does not match Photoshop

Posted: 2014-09-23T11:18:43-07:00
by msundell
Trying to adjust -depth conversion from 16 bit to 8 bit for TIFF to match Photoshop, for some reason values does not end up the same. Can't say for sure why AND I haven't tried all operators with -depth so I'm asking for some help here. Take a look at the attached screenshot.

Image

What we see is edges being compared, the values are printed out along with the type of conversion to the right. The first example does it well, preserves values after conversion to 8 bit, the second and the third one comes from convert using -depth 8 only from 16 bit input. The forth is the 16 bit input, original values. The last one is a JPG converted from the -depth 8 bit converted file.

How can I tweak the -depth scaling to better match Photoshop, will keep digging but hoping for a quick push in the right direction :)

Thanks!

Re: -depth 8 does not match Photoshop

Posted: 2014-09-23T11:26:53-07:00
by glennrp
It would help to know the 16-bit values of those two pixels in the original 16-bit file. Someone else will probably ask what version of ImageMagick you are using.

Re: -depth 8 does not match Photoshop

Posted: 2014-09-23T11:37:37-07:00
by msundell
ImageMagick version: ImageMagick-6.7.6-4-Q16_x64

Values in the example:
8-bit values: First example: 254,247 (right to left) << Expected values after 16 to 8 bit in Photoshop
8-bit values: Second example: 255,254 (right to left) << Values after convert -depth 8
16-bit values: Forth example ORIGINAL: 254,248 (right to left) << Original TIFF

Re: -depth 8 does not match Photoshop

Posted: 2014-09-23T14:12:01-07:00
by glennrp
Those don't look like 16-bit values. I'd expect numbers like 65278 instead of 254 and 63736 instead of 248.