Page 1 of 1

Create TIFF with 5 channels

Posted: 2010-11-19T11:50:28-07:00
by AndrewD
I need to be able to convert transparnet PNG file into CMYK with 5 channels.
Standard 4 CMYK channels and additional alpha channel.
I tried using "convert input.png -type ColorSeparationMatte output.tif" but that gives me transparent CMYK TIF, but with only 4 channels.
Is there a way to do what I need?
Thanks.

Re: Create TIFF with 5 channels

Posted: 2010-11-19T12:53:25-07:00
by fmw42
try -type truecolormatte

or

convert image -channel CMYKA -alpha on -type truecolormatte result

Re: Create TIFF with 5 channels

Posted: 2010-11-19T14:08:46-07:00
by AndrewD
I need the final image to be CMYK not RGB. truecolormatte converts it to RGB.
Adding -alpha on does not get me that 5th alpha channel.

Re: Create TIFF with 5 channels

Posted: 2010-11-19T16:06:24-07:00
by fmw42
what colorspace is your input image. is it rgb or cmyk. if the latter try

convert image -channel CMYKA -alpha on result

if the former, try

convert image -colorspace cmyk -alpha on result

or

convert image -alpha on -colorspace cmyk result


If these don't work. Then hopefully one of the IM developers can clarify.

Re: Create TIFF with 5 channels

Posted: 2010-11-20T15:34:31-07:00
by AndrewD
Thanks for your attempts, but I still only get 4 channels (CMYK). The input is RGB.

Re: Create TIFF with 5 channels

Posted: 2010-11-20T16:05:08-07:00
by fmw42
This seems to work for me (starting with png image with binary overlay), IM 6.6.5-8 Q16 (hdri) Mac OSX Tiger


convert rgba_image -channel RGBA -colorspace CMYK result.tiff

as does this

convert rgba_image -colorspace CMYK result.tiff

Perhaps you can post a link to it.

what version of IM are you using? perhaps you need to upgrade?

Re: Create TIFF with 5 channels

Posted: 2010-11-20T16:09:25-07:00
by AndrewD
I still only get 4 channels in photoshop. Maybe my version of imagemagick?
Can you try to do this with the following file:
http://www.pmalladmin.com/andrew/aatemp.zip
It contains PNG file and result tiff file. When I open tif file in photoshop I only see 4 channels.

Re: Create TIFF with 5 channels

Posted: 2010-11-20T16:16:56-07:00
by fmw42
According to IM verbose info: you have 5 channels, cmyka

identify -verbose output4.tiff


Image: output4.tiff
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 3360x2640+0+0
Resolution: 118.11x118.11
Print size: 28.4481x22.352
Units: PixelsPerCentimeter
Type: ColorSeparationMatte
Base type: ColorSeparation
Endianess: MSB
Colorspace: CMYK
Depth: 8-bit
Channel depth:
cyan: 8-bit
magenta: 8-bit
yellow: 8-bit
black: 8-bit
alpha: 8-bit

Channel statistics:
Cyan:
min: 0 (0)
max: 198 (0.776471)
mean: 0.8262 (0.00324)
standard deviation: 9.77412 (0.0383299)
kurtosis: 172.497
skewness: 12.7969
Magenta:
min: 0 (0)
max: 172 (0.67451)
mean: 9.19155 (0.0360453)
standard deviation: 33.5745 (0.131665)
kurtosis: 11.294
skewness: 3.59293
Yellow:
min: 0 (0)
max: 223 (0.87451)
mean: 10.8197 (0.0424302)
standard deviation: 39.2225 (0.153814)
kurtosis: 10.6109
skewness: 3.49836
Black:
min: 0 (0)
max: 255 (1)
mean: 237.63 (0.931881)
standard deviation: 56.5534 (0.221778)
kurtosis: 8.2933
skewness: -3.13384
Alpha:
min: 0 (0)
max: 255 (1)
mean: 25.0522 (0.0982441)
standard deviation: 75.7024 (0.296872)
kurtosis: 5.29872
skewness: -2.6995


Perhaps it is a Photoshop issue or your use of photoshop. Photoshop can have two types of transparency, background or alpha.

When I open your output4.tiff in my old PS CS, I select the channels in the toolbar on the right and it shows: C,M,Y,K,alpha1.

Photoshop displays the image only with background transparency, which you do not have. You an alpha channel.

Re: Create TIFF with 5 channels

Posted: 2010-11-20T16:23:21-07:00
by AndrewD
Thanks for looking into this. I do see 5 channels when doing identify. I'm using photoshop 5 and it only does list 4 channels. I do have another image that I'm trying to mimic and that one does have a separate channel.

Re: Create TIFF with 5 channels

Posted: 2010-11-20T17:41:02-07:00
by fmw42
Photoshop 5 is very old. Perhaps it was not able to handle alpha transparency or perhaps you can find it elsewhere in PS.

Re: Create TIFF with 5 channels

Posted: 2010-11-22T07:27:19-07:00
by AndrewD
What I meant was Photoshop CS5 (latest one).

Re: Create TIFF with 5 channels

Posted: 2010-11-22T11:13:29-07:00
by fmw42
Seems to then be a CS5 issue or where CS5 reports alpha channel transparency which may have changed since my old CS.