Okay, it definitely seems to have something to do with the TIF format of the overlay image, perhaps the fact that it is CMYK. I broke the test down a bit more and discovered that any manipulation of the price image causes it to lose the anti-aliasing/transparency. In
this zip file is the original price image, "CanPrice.tif", and the results of converting the image to PNG with IM6 and IM7.
Code: Select all
im6>convert CanPrice.tif canpricev6.png
im7>magick CanPrice.tif canpricev7.png
The v6 version looks fine, but the v7 version is jagged when zoomed in. ImageMagick does tell me it doesn't like something about the image:
Code: Select all
magick: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag'
Code: Select all
magick CanPrice.tif -colorspace srgb canpricergb.tif
It also loses the transparency when I just try to change the colorspace. The original price TIF is CMYK - perhaps that is significant? I created a simple rgb TIF with some text using Paint.NET. When I converted that image to PNG with IM7 it did not lose the anti-aliasing effect.
I did try using the magick command instead of composite - it had no effect.
This zipfile contains the results of another set of tests. I cannot share the original background image, but I was able to replicate the problem using just a plain white background. I made a TIF and PNG verison of the background. I also used the good PNG version of the price I created with IM6, and created all 8 permutations of the two images. It didn't matter whether the background was TIF or PNG, or whether I was outputting to TIF or PNG. All that mattered was which price image I used. If I used the TIF, the output was jagged. If I used the PNG the output looked fine.
Code: Select all
magick white.tif CanPrice.tif -composite outT-T.tif
magick white.tif CanPrice.png -composite outT-P.tif
magick white.png CanPrice.tif -composite outP-T.tif
magick white.png CanPrice.png -composite outP-P.tif
magick white.png CanPrice.png -composite outP-P.png
magick white.png CanPrice.tif -composite outP-T.png
magick white.Tif CanPrice.tif -composite outT-T.png
magick white.Tif CanPrice.png -composite outT-P.png
I am using the latest Magick.NET code "Magick.NET 7.0.0.0009; Jan 26, 2015, Alpha", but all of the images linked above were generated with the ImageMagick commandline tools on a Windows 7 machine.
Code: Select all
Version: ImageMagick 6.9.0-1 Q8 x64 2014-12-22 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates (built-in): bzlib cairo freetype jbig jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib
Version: ImageMagick 7.0.0-0 Q16 x64 2015-01-09 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
Features: DPC Modules HDRI OpenMP
Delegates (built-in): bzlib cairo freetype jbig jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib
I downloaded an older version of Magick.NET (Magick.NET-6.8.9.601-Q16-x64-net20) and it works fine, which seems to further confirm it is something in ImageMagick and not the .NET code.
Thanks, and please let me know if you have any issues getting the images or if you need anything else from me.