So I have some images that were converted from RAW in Photoshop and several layer masks applied. I saved these files to tiff with no layers. Tiff image looks as expected. When I use the following command line, the resulting images shows a sort of negative b/w effect in the areas where the masks were applied.
convert Coxy-2016-10-22-0016-cr.tif -resize 800x800 out/Coxy-2016-10-22-0016-cr.png
If I change the format to JPG the images are much better, but several of the images show like random dead white pixels around the edge of the main mask.
Any idea what is going on? Also the process works fine with images that had layers, it just seems to be the mask that cause problems.
..dan
Tiff to PNG shows layer masks even though tiff is flattened
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Tiff to PNG shows layer masks even though tiff is flattened
What is your IM version and platform? Please always provide that, since syntax may vary? Please post your input and output images to some free hosting service such as dropbox.com and put the urls here, so we can test with your images.
Re: Tiff to PNG shows layer masks even though tiff is flattened
So I was on Windows 8 when I first did this activity, I just moved to Windows 10 and ran it there now to find a file with this problem. All but one of the files seems to be working. the one example I can find is now a complete negative view. Here is the info I got back at the command line, nothing looks any different than the rest of the batch of files.
found: Y:/Images/2016/website-copyright/d001-08476.tif
CMD: convert Y:/Images/2016/website-copyright/d001-08476.tif -resize 800x800 out/d001-08476.png
convert.exe: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/891.
convert.exe: Unknown field with tag 34864 (0x8830) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/891.
convert.exe: Unknown field with tag 34866 (0x8832) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/891.
convert.exe: Unknown field with tag 42033 (0xa431) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/891.
convert.exe: Unknown field with tag 42034 (0xa432) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/891.
convert.exe: Unknown field with tag 42036 (0xa434) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/891.
convert.exe: Unknown field with tag 42037 (0xa435) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/891.
convert.exe: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/891.
Looking at tiff file now it seems to have gotten damaged, but even sow, the results from the conversion do not match the tiff file.
You can find the before image (.tiff) and the output .png file here:
https://www.dropbox.com/sh/krjbz7k75i5p ... kQS5a?dl=0
found: Y:/Images/2016/website-copyright/d001-08476.tif
CMD: convert Y:/Images/2016/website-copyright/d001-08476.tif -resize 800x800 out/d001-08476.png
convert.exe: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/891.
convert.exe: Unknown field with tag 34864 (0x8830) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/891.
convert.exe: Unknown field with tag 34866 (0x8832) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/891.
convert.exe: Unknown field with tag 42033 (0xa431) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/891.
convert.exe: Unknown field with tag 42034 (0xa432) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/891.
convert.exe: Unknown field with tag 42036 (0xa434) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/891.
convert.exe: Unknown field with tag 42037 (0xa435) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/891.
convert.exe: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/891.
Looking at tiff file now it seems to have gotten damaged, but even sow, the results from the conversion do not match the tiff file.
You can find the before image (.tiff) and the output .png file here:
https://www.dropbox.com/sh/krjbz7k75i5p ... kQS5a?dl=0
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Tiff to PNG shows layer masks even though tiff is flattened
Your download only seems to get the PNG for me.
Re: Tiff to PNG shows layer masks even though tiff is flattened
Hmm, I see both files there. Here is a direct link to the tiff
https://www.dropbox.com/s/gpvr01fxj1ory ... 6.tif?dl=0
png
https://www.dropbox.com/s/zby2zvjtc764t ... 6.png?dl=0
https://www.dropbox.com/s/gpvr01fxj1ory ... 6.tif?dl=0
png
https://www.dropbox.com/s/zby2zvjtc764t ... 6.png?dl=0
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Tiff to PNG shows layer masks even though tiff is flattened
Using IM 6.9.7.4 Q16 Mac OSX, this command works fine for me. The image is not color inverted.
You get warnings about unknown meta tags, but you can ignore those or add -quiet after convert in your command to suppress them.
What is your Imagemagick version and what do you get from
Code: Select all
convert d001-08476.tif -resize 800x800 d001-08476.png
What is your Imagemagick version and what do you get from
Code: Select all
convert -version
Re: Tiff to PNG shows layer masks even though tiff is flattened
version ImageMagick 6.9.3-7 Q16 x64 2016-03-06 on Windows 10 now
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Tiff to PNG shows layer masks even though tiff is flattened
It looks to me that your alpha channel is somehow getting inverted. But I do not get that effect. My result matches the input.
Perhaps try upgrading Imagemagick, libtif and libpng.
What are your versions of libtif and libpng? You can find them from
Mine are:
PNG* PNG rw- Portable Network Graphics (libpng 1.6.24)
TIFF* TIFF rw+ Tagged Image File Format (LIBTIFF, Version 4.0.6)
Perhaps try upgrading Imagemagick, libtif and libpng.
What are your versions of libtif and libpng? You can find them from
Code: Select all
convert -list format
PNG* PNG rw- Portable Network Graphics (libpng 1.6.24)
TIFF* TIFF rw+ Tagged Image File Format (LIBTIFF, Version 4.0.6)