Page 1 of 1

[Not a bug] TIFF to PNG -> Black image

Posted: 2019-02-06T04:06:25-07:00
by bernoot
Hello everybody,

I have a TIFF image (link below) which comes from a microscope recording on a Windows computer.
When I try to convert it into png using the command line (convert AFAset0002_t001p09.TIF AFAset0001_t001p09.png), I get a completely black image, and the following warnings:
convert-im6.q16: Unknown field with tag 40001 (0x9c41) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 40002 (0x9c42) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 40012 (0x9c4c) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 40106 (0x9caa) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 50288 (0xc470) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 50289 (0xc471) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 50290 (0xc472) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 50291 (0xc473) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 50292 (0xc474) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 50293 (0xc475) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 50294 (0xc476) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 50295 (0xc477) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 50296 (0xc478) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.
convert-im6.q16: Unknown field with tag 50297 (0xc479) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/912.

The same warnings are displayed by Gimp, although the image loads properly and can be converted into png.
I can also display the TIF image using eye-of-gnome.

convert ... -normalize ... gives only blue/red noise (and prints the warnings).
I also tried -define png:swap-bytes, found elsewhere on this site, but the result is the same.

Any idea?

Thanks

The original image (2048x1536 8-bit sRGB): https://www.dropbox.com/s/pmzcvj4gzkdzx ... 9.TIF?dl=0
System: Ubuntu 18.04
Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114

Re: TIFF to PNG -> Black image

Posted: 2019-02-06T04:15:25-07:00
by snibgo
Don't worry about those warnings.

Your linked tiff converts for me, IM v6.9.9-50, giving a good image.

Your linked tiff is named AFAset0001_t001p09.TIF, which is a slightly different name to the one in your quoted command.

Re: TIFF to PNG -> Black image

Posted: 2019-02-06T06:31:48-07:00
by bernoot
Thanks snibgo for your answer, the command line was wrong, hence the error... shame on me! :oops: