CMYK with Alpha Tiff resize problem.

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Stefan
Posts: 7
Joined: 2019-03-22T13:08:07-07:00
Authentication code: 1152

CMYK with Alpha Tiff resize problem.

Post by Stefan » 2019-03-22T13:30:22-07:00

I'm having trouble to resize CMYK image with transparent background.
I search the similar topics but still not find the exact solution.

When I resize the original tiff image, its background(transparent) part get white and some foreground part get transparent.

I tried the following.
convert -channel CMYKA orig.tif -resize 1000x1000 -alpha on -colorspace CMYK result.tif

The files are here.
https://www.dropbox.com/s/0n3zj64kz1g6z7v/Data.zip?dl=0

I'm using ImageMagick-7.0.8-34-Q16-x86-dll on Windows10.

Please help me which convert command options I should use.
Thanks.

User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: CMYK with Alpha Tiff resize problem.

Post by fmw42 » 2019-03-22T16:27:12-07:00

I do not know what you expect to see. What are the correct colors? Photoshop shows a yellow cat on transparency. But extracting the layers to PNG shows a gray cat with pink ears?

I cannot reproduce what I see in Photoshop using any of

Code: Select all

convert orig.tif -define tiff:alpha=unspecified|associated|unassociated new.tif
with IM 6.9.10.34 Q16 Mac OSX

I will need to defer this to the IM developers. It is possible that -define tiff:alpha is not being set correctly

Stefan
Posts: 7
Joined: 2019-03-22T13:08:07-07:00
Authentication code: 1152

Re: CMYK with Alpha Tiff resize problem.

Post by Stefan » 2019-03-22T16:36:41-07:00

Hi, thanks for quick reply.
As you can see, the orig.tif file is opened in PS with transparent background, but result.tif is opened with white background.
I want the result.tif is opened as the same as the orig.tif in the Photoshop.

User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: CMYK with Alpha Tiff resize problem.

Post by fmw42 » 2019-03-22T16:37:29-07:00

I still do not know what exact color the cat should be? Is it yellow?

Stefan
Posts: 7
Joined: 2019-03-22T13:08:07-07:00
Authentication code: 1152

Re: CMYK with Alpha Tiff resize problem.

Post by Stefan » 2019-03-22T16:39:55-07:00

Yes, yellow with pink ears.

User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: CMYK with Alpha Tiff resize problem.

Post by fmw42 » 2019-03-22T16:46:24-07:00

My photoshop show yellow cat with orange ears!

Code: Select all

convert orig.tif -define tiff:alpha=unspecified new.tif
Shows the same but the transparency is gone and is white background. With the define set to associate or unassociated alpha and negating the alpha channel the cat becomes gray with blue eyes and pink ears.

So what is the correct view. Can you export what you expect from Photoshop as JPG or PNG? And put a link to that image here.

Stefan
Posts: 7
Joined: 2019-03-22T13:08:07-07:00
Authentication code: 1152

Re: CMYK with Alpha Tiff resize problem.

Post by Stefan » 2019-03-22T16:50:59-07:00

This is what I'm expecting at Photoshop.

https://www.dropbox.com/s/x8990z6ot0059 ... 3.png?dl=0

User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: CMYK with Alpha Tiff resize problem.

Post by fmw42 » 2019-03-22T16:57:49-07:00

That is not what the preview window of Photoshop shows.

Nevertheless, do

Code: Select all

convert orig.tif +reverse result.tif
and that will give you want you want.

Stefan
Posts: 7
Joined: 2019-03-22T13:08:07-07:00
Authentication code: 1152

Re: CMYK with Alpha Tiff resize problem.

Post by Stefan » 2019-03-22T17:04:04-07:00

OHHHHHH!
Great!!!!!!

Thanks. It works fine.

Stefan
Posts: 7
Joined: 2019-03-22T13:08:07-07:00
Authentication code: 1152

Re: CMYK with Alpha Tiff resize problem.

Post by Stefan » 2019-03-23T05:47:23-07:00

Hello.
I just found that the white channel of orig.tif file has disappeared in result.tif.

Could you kindly tell me how to keep the white channel?
Thanks.

Stefan
Posts: 7
Joined: 2019-03-22T13:08:07-07:00
Authentication code: 1152

Re: CMYK with Alpha Tiff resize problem.

Post by Stefan » 2019-03-23T08:05:25-07:00

Hello. I was very appreciated for your help yesterday.
But I'm sorry that I want to keep the last channel.

Here is my problem again.
Last time I tested from Photoshop Element 2018 and the two images were look same.
( convert orig.tif +reverse -result.tif)

But when I tried with [PhotoShop CC 2015.5] at macOS, the result was unexpected.
the orig.tif file was yellow cat, but result.tif was white-blue cat.
the difference is that result.tif lost the white channel of the orig.tif.

Please help me with this problem.
Thanks.

User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: CMYK with Alpha Tiff resize problem.

Post by fmw42 » 2019-03-23T10:02:07-07:00

Currently, ImageMagick cannot deal with extra channels or spot colors.

Post Reply