rotation of a cmyk image breaks the black channel
rotation of a cmyk image breaks the black channel
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?
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
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
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.
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
We cannot download cmyka.tif. We get a permission denied exception.
Re: rotation of a cmyk image breaks the black channel
Sorry, I uploaded it with a different name. I renamed it, try it now.
Re: rotation of a cmyk image breaks the black channel
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
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.
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
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 ?
respects TeeTanne
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
Re: rotation of a cmyk image breaks the black channel
Try this instead
- convert -colorspace RGB cmyk.eps rgb.jpg
Re: rotation of a cmyk image breaks the black channel
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.
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
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
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
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
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
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
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
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 cmyk.tif -rotate 45 6498a.tif
add an empty alpha channel
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.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