Page 1 of 1

Simple tiff conversion question

Posted: 2010-04-01T10:19:22-07:00
by mightyfaulk
I was hoping someone might be able to get me some advice on this as I'm fairly new to ImageMagick

I've got a tiff image in CMYK with an alpha channel. The CMYK profile embedded into the image is US Web Coated (SWOP) v2.

I'm try to do two simple conversions, one resizes the tiff and outputs an RGB png, the other resizes the tiff and outputs a CMYK tiff.

The resize goes fine, but the alpha channel is lost in both cases. I get a solid white background as a result of the conversion.

Could anyone walk me through the correct command line syntax for these two conversions?

Also I am working with ImageMagick 6.2.8

Thank you for the help!

Re: Simple tiff conversion question

Posted: 2010-04-01T10:30:24-07:00
by magick
Post a URL to your image and the exact command line you are using. We will confirm if the conversion works with the latest ImageMagick release. If not, it would be a bug and we'll provide a patch to fix the problem.

Re: Simple tiff conversion question

Posted: 2010-04-01T10:38:47-07:00
by mightyfaulk
Here's the tiff file (5 megs):
http://distributors.ultimatenutrition.c ... De3Ug9.tif

The commands I am using are fairly simple:

for the RGB png:
convert path/to/image.tif -profile AdobeRGB1998.icc -resize 100x100 path/to/output.png

for CMYK tiff:
convert path/to/image.tif -resize 100x100 path/to/output.tif

Both do their task other than preserving the alpha channel

Re: Simple tiff conversion question

Posted: 2010-04-01T10:56:59-07:00
by magick
DRVq3ITTKjDe3Ug9.tif does not have an alpha channel. It has 4 channels, C, M, Y, and K:
  • -> tiffinfo DRVq3ITTKjDe3Ug9.tif
    TIFFReadDirectory: Warning, DRVq3ITTKjDe3Ug9.tif: wrong data type 7 for "RichTIFFIPTC"; tag ignored.
    TIFFReadDirectory: Warning, DRVq3ITTKjDe3Ug9.tif: unknown field with tag 37724 (0x935c) encountered.
    TIFF Directory at offset 0x8 (8)
    Subfile Type: (0 = 0x0)
    Image Width: 696 Image Length: 1380
    Resolution: 300, 300 pixels/inch
    Bits/Sample: 8
    Compression Scheme: LZW
    Photometric Interpretation: separated
    Orientation: row 0 top, col 0 lhs
    Samples/Pixel: 4
    Rows/Strip: 94
    Planar Configuration: single image plane
    Make: Canon
    Model: Canon EOS 5D Mark II
    Software: Adobe Photoshop CS4 Macintosh
    DateTime: 2010:03:22 14:00:13
    XMLPacket (XMP Metadata):

Re: Simple tiff conversion question

Posted: 2010-04-01T11:04:13-07:00
by mightyfaulk
When I open it up in photoshop I get a transparent background so I assumed it was a CMYK with alpha. Is there a way I can convert it to CMYKA or access the transparent background to do the conversion I am attempting?

Re: Simple tiff conversion question

Posted: 2010-04-01T11:06:56-07:00
by snibgo
IM and GIMP find no transparency in DRVq3ITTKjDe3Ug9.tif

I suggest you download that uploaded file, and try it again in Photoshop.

Re: Simple tiff conversion question

Posted: 2010-04-01T11:17:38-07:00
by mightyfaulk
http://distributors.ultimatenutrition.com/new/ss.jpg

Here's how photoshop sees it. Not sure what's causing the difference.

Re: Simple tiff conversion question

Posted: 2010-04-01T12:00:02-07:00
by fmw42

Re: Simple tiff conversion question

Posted: 2010-04-01T12:13:33-07:00
by magick
Most likely the image has a clipping path. You can activate it with the -clip-path option.

Re: Simple tiff conversion question

Posted: 2010-04-01T12:58:41-07:00
by mightyfaulk
there it is.. the culprit is clipping paths! thank you all for the help :)

Re: Simple tiff conversion question

Posted: 2010-04-09T07:37:52-07:00
by mightyfaulk
Right now using:

Code: Select all

convert -clip-path #1 CMYK.tiff -profile rgb_profile -alpha transparent RGB.png
Clips out the circle (because my clipping path is around the circle) and leaves the background, but I would like to do the opposite based off this clipping path (remove the background and leave the circle). Is possible to invert a clipping path?