I am trying to consistently flatten TIFFs against a white background. When I encounter a TIFF that has transparency disabled, but contains an auxiliary alpha channel, Image Magick considers that channel the transparency channel, and results are not good.
I have two input TIFF files--one with transparency enabled, one with it disabled. Both have a checkerboard background in Photoshop. I am using the "Enable Transparency" in the Save As dialog within Photoshop.
Both files have an additional channel added within Photoshop containing some brush strokes of leaves.
The sample files are here:
Without Transparency: https://www.dropbox.com/s/fli26u0u4f25i ... y.tif?dl=0
With Transparency: https://www.dropbox.com/s/s1aidyct4oqib ... .tif?dl=0z
Here are the commands I run against them:
Code: Select all
convert with-transparency.tif -background white -alpha off -flatten out/whiteAlphaOffFlatten.tif
convert with-transparency.tif -background white -flatten out/whiteFlatten.tif
convert without-transparency.tif -background white -flatten out/without-whiteFlatten.tif
convert without-transparency.tif -background white -alpha off -flatten out/without-whiteAlphaOffFlatten.tif
I would love some input on how I can flatten these suckers! Am I doing something wrong? This is driving me bonkers!