How to ignore alpha channel?
Posted: 2010-10-06T22:18:13-07:00
I need to convert a CMYK TIFF that contains an alpha channel to JPEG. My original command was
I've used this for a while on images that do not contain an alpha channel with no problems. However if the TIFF contains an alpha channel then the output file has unsmooth, pixelated edges. Here are some samples:
orig: http://www.50amp.com/im/alphatest.tif
what it should look like: http://www.50amp.com/im/alphatest-good.jpg
what it shouldn't look like: http://www.50amp.com/im/alphatest-bad.jpg
I've tried several options to try to keep IM from interpreting the alpha channel but have had no luck. For example:
This gives the same bad result. Shouldn't 'alpha off' force IM to ignore the alpha channel?
I tried this in an effort to force IM to operate only on the CMYK channels however this produces the same bad result.
Am I making syntax errors or do these operators just no do what I'm thinking they do?
Code: Select all
convert -resample 72x72 -resize "1024x1024>" -units PixelsPerInch -quality 95 test.tif test.jpg
orig: http://www.50amp.com/im/alphatest.tif
what it should look like: http://www.50amp.com/im/alphatest-good.jpg
what it shouldn't look like: http://www.50amp.com/im/alphatest-bad.jpg
I've tried several options to try to keep IM from interpreting the alpha channel but have had no luck. For example:
Code: Select all
convert -resample 72x72 -resize "1024x1024>" -units PixelsPerInch -quality 95 test.tif -alpha off test.jpg
Code: Select all
convert -channel CMYK -resample 72x72 -resize "1024x1024>" -units PixelsPerInch -quality 95 test.tif test.jpg
Am I making syntax errors or do these operators just no do what I'm thinking they do?