Page 1 of 1
rotation of a cmyk image breaks the black channel
Posted: 2007-03-19T10:57:38-07:00
by Jon
take a cmyk image (
www.brickstores.com/misc/cmyktest.tif)
convert cmyktest.tif -rotate 45 output.tif
6.3.3-0 windows convert gives
www.brickstores.com/misc/6.3.3.0-45.tif
(which is broken)
5.5.7 windows convert gives
www.brickstores.com/misc/5.5.7-45.tif
(which is ok)
is there any interest in moving towards adding an extra real layer for the black channel (like r g b and opacity) so there is less special case stuff that has to be done?
Re: rotation of a cmyk image breaks the black channel
Posted: 2007-03-19T11:25:36-07:00
by magick
We can reproduce the problem you posted and will have a fix in ImageMagick 6.3.3-3 Beta by tommorrow.
Re: rotation of a cmyk image breaks the black channel
Posted: 2007-03-21T00:10:11-07:00
by Jon
That fixed that problem but further probing cmyk and cmyka (alpha) images gives the following related bugs:
add an extra (mask) channel (
www.brickstores.com/misc/cmyka.tif)
convert cmyka.tif -rotate 45 output.tif
the cmyk channels have been masked by the rotated alpha channel which is zeroed out.
(note that -rotate 90 works fine)
convert cmyka.tif -resize 150% output.tif
the cmyk channels have been masked by the alpha channel which is zeroed out.
Re: rotation of a cmyk image breaks the black channel
Posted: 2007-03-21T07:31:42-07:00
by magick
We cannot download cmyka.tif. We get a permission denied exception.
Re: rotation of a cmyk image breaks the black channel
Posted: 2007-03-21T11:35:41-07:00
by Jon
Sorry, I uploaded it with a different name. I renamed it, try it now.
Re: rotation of a cmyk image breaks the black channel
Posted: 2007-03-21T12:54:02-07:00
by magick
We have a patch for the problem you reported. It will be available in ImageMagick 6.3.3-3 Beta sometime tommorrow.
Re: rotation of a cmyk image breaks the black channel
Posted: 2007-03-24T00:10:59-07:00
by Jon
although the alpha channel is being preserved now after -rotate or -resize, it is being applied as a mask so the cmyk channels of the result are masked. is this correct? since the simplest case:
convert cmyka.tif out.tif
and
convert cmyka.tif -resize 100% out.tif
don't
and 5.5.7 didn't
this would seem to still be a bug.
Re: rotation of a cmyk image breaks the black channel
Posted: 2007-04-03T05:48:29-07:00
by teetanne
I have a similar problem. I want to convert a eps (CMYK with preview) to RGB-Jpeg. The conversation remove the black channel also.
The problem is still present at 6.3.3-5. Do you need a sample ?
Code: Select all
convert cymk.eps -colorspace RGB rgb.jpg
respects TeeTanne
Re: rotation of a cmyk image breaks the black channel
Posted: 2007-04-03T06:37:39-07:00
by magick
Try this instead
- convert -colorspace RGB cmyk.eps rgb.jpg
Re: rotation of a cmyk image breaks the black channel
Posted: 2007-04-03T10:19:45-07:00
by teetanne
Ok, the cmd line work.
I wrote a C++ program which I use to do the conversation automatically.
But it doesn't work with the release version of IM 6.3.3-5. The debug version do the conversation
and keep the black channel.
Re: rotation of a cmyk image breaks the black channel
Posted: 2007-04-03T11:14:08-07:00
by magick
We require a small code segment that we can download, run, and reproduce the problem. We will then tell you how to modify your code to achieve the desired result.
Re: rotation of a cmyk image breaks the black channel
Posted: 2007-04-04T02:42:23-07:00
by teetanne
You can download a VS project with a sample file (test.eps) from
http://www.sports-space.de/colorspace/colorspace.zip
Before you compile it please edit the project file and apapt the path to your image magick installation.
The program will convert a cmyk-eps file to a rgb-jpeg file. Please run the program in debug and release mode. The debug version will generate a file "out_DB.jpg", respectively "out_RL.jpg" in release mode. Even when you start the debug mode the program throw a assert. I ignore the error alway.
Hopfully the code will help you.
respects TeeTanne
Re: rotation of a cmyk image breaks the black channel
Posted: 2007-04-10T12:12:47-07:00
by magick
We put a patch in ImageMagick 6.3.3-7 Beta (available sometime tommorrow) to set the colorspace *before* you read the Postscript image. In your case, use:
- image.colorspaceType(RGBColorspace);
image.read(szFile);
Re: rotation of a cmyk image breaks the black channel
Posted: 2009-03-03T02:48:39-07:00
by Jon
There are still seem to be a number of issues wrt rotating cmyk images:
why does:
convert cmyk.tif -rotate 45 6498a.tif
add an empty alpha channel
trying to use -background to control the added alpha channel i find:
why does:
convert -background #00000000 cmyk.tif -rotate 45 6498b.tif
add an empty alpha channel and make the black channel black in the part of the image outside the original image
why does:
convert -background #000000FF cmyk.tif -rotate 45 6498c.tif
add an alpha channel and make both the alpha channel and the black channel black in the part of the image outside the original image
i am using the 8bit static single thread windows version of 6.4.9-8
the files are available in:
http://www.brickstores.com/misc/cmyk.tif
http://www.brickstores.com/misc/6498a.tif
http://www.brickstores.com/misc/6498b.tif
http://www.brickstores.com/misc/6498c.tif
Re: rotation of a cmyk image breaks the black channel
Posted: 2009-03-03T09:12:01-07:00
by magick
why does:
convert cmyk.tif -rotate 45 6498a.tif
add an empty alpha channel
Image rotation uses a blend operator which requires an alpha channel. After the rotation, if are not interested in the alpha channel, add +matte to your command line to turn the alpha channel off.
why does:
convert -background #00000000 cmyk.tif -rotate 45 6498b.tif
add an empty alpha channel and make the black channel black in the part of the image outside the original image
The background color is legacy and therefore strictly RGB. To fix the background color, apply it as RGB and use -opaque to replace it in the image. The -opaque option accepts CMYK colors (e.g. cmyk(100,0,40,0)). You can also first convert the image to the RGB colorspace, rotate it, and then convert it back to CMYK. This is best done with a SWOP and sRGB color profile.