Simple tiff conversion question

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mightyfaulk

Simple tiff conversion question

Post 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!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Simple tiff conversion question

Post 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.
mightyfaulk

Re: Simple tiff conversion question

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Simple tiff conversion question

Post 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):
mightyfaulk

Re: Simple tiff conversion question

Post 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?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Simple tiff conversion question

Post by snibgo »

IM and GIMP find no transparency in DRVq3ITTKjDe3Ug9.tif

I suggest you download that uploaded file, and try it again in Photoshop.
snibgo's IM pages: im.snibgo.com
mightyfaulk

Re: Simple tiff conversion question

Post by mightyfaulk »

http://distributors.ultimatenutrition.com/new/ss.jpg

Here's how photoshop sees it. Not sure what's causing the difference.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Simple tiff conversion question

Post by fmw42 »

User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Simple tiff conversion question

Post by magick »

Most likely the image has a clipping path. You can activate it with the -clip-path option.
mightyfaulk

Re: Simple tiff conversion question

Post by mightyfaulk »

there it is.. the culprit is clipping paths! thank you all for the help :)
mightyfaulk

Re: Simple tiff conversion question

Post 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?
Post Reply