Page 1 of 1
identify: no pixels defined in cache `XXXXX' @ c
Posted: 2010-02-25T17:10:04-07:00
by Moonshine
I use "identify" to check the colorspace of images on upload. Previously it had been working flawlessly, however a recent Fedora 11 update seems to have identify tossing random errors on some CMYK files being uploaded. I'm using:
Code: Select all
Version: ImageMagick 6.5.1-2 2010-01-06 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
The command I use:
Code: Select all
/usr/bin/identify -quiet -format '%[colorspace]' cmyk_test_image.jpg
Results in:
Code: Select all
identify: no pixels defined in cache `cmyk_test_image.jpg' @ cache.c/OpenPixelCache/3789.
CMYK
Here is an image for testing:
http://james.netfocal.com/test/cmyk_test_image.jpg
BTW, it also looks like the copyright could use an update to 2010
Re: identify: no pixels defined in cache `XXXXX' @ c
Posted: 2010-02-25T17:31:01-07:00
by magick
Your command works fine with the latest releases of ImageMagick. We're not sure why it fails for ImageMagick 6.5.1. We'll investigate.
Re: identify: no pixels defined in cache `XXXXX' @ c
Posted: 2010-02-26T11:29:05-07:00
by Moonshine
Thanks for the reply.. I'll compile my own, but I would be curious what version made the correction if you happen to find out. Just so I can jump back on the Yum train again someday for these servers.
Re: identify: no pixels defined in cache `XXXXX' @ c
Posted: 2010-02-26T14:05:45-07:00
by Moonshine
I updated a development machine here to 6.6 via the binary distribution today. Identify does work without error for me in 6.6. Excellent.
However my "convert" script (for converting the images from CMYK to RGB) seems to have very different output from 6.5.1-2 to 6.6 using the same command and profile. The output I get from 6.6 looks very washed out, like a levels or gamma shift, and the color mapping seems different also. The ouput from 6.5.1-2 is correct when compared to Photoshop CS4 and OSX preview output. An example command is like:
Code: Select all
convert test-cmyk.jpg -resize 600x600! -unsharp 0.5x0.4+0.8+0.1 -quality '80' -profile sRGB.icc test-rgb.jpg
using the files here:
http://james.netfocal.com/imagemagick
which produces this in 6.5.1-2:
and this in 6.6:
I've tried poking around to see if there are some new options I should use, or if a new profile would help, but I can't seem to find anything to correct things. Not sure if anyone has suggestions, or if I should just open a new thread...
Thanks for any help...
Re: identify: no pixels defined in cache `XXXXX' @ c
Posted: 2010-02-26T14:13:24-07:00
by fmw42
try
convert -colorspace RGB test-cmyk.jpg -resize 600x600! -unsharp 0.5x0.4+0.8+0.1 -quality '80' -profile sRGB.icc test-rgb.jpg
or just
convert -colorspace RGB test-cmyk.jpg -resize 600x600! -unsharp 0.5x0.4+0.8+0.1 -quality '80' test-rgb.jpg
The latter seems to work for me. I could not do the former as I don't have that profile handy.
IM 6.6.0-0 Q16 Mac OSX Tiger
If you have a CMYK profile, then you can use that before your sRGB profile and avoid using -colorspace RGB
see
http://www.imagemagick.org/Usage/formats/#profiles
Re: identify: no pixels defined in cache `XXXXX' @ c
Posted: 2010-02-26T14:35:24-07:00
by Moonshine
Thanks for the reply! I'm testing with 6.6.0-0 Q16 under Fedora core 11.
With your first suggestion I got:
Code: Select all
[root@lightning imagemagick]# convert -colorspace RGB test-cmyk.jpg -resize 600x600! -unsharp 0.5x0.4+0.8+0.1 -quality '80' -profile sRGB.icc test-rgb.jpg
convert: color profile operates on another colorspace `icc' @ error/profile.c/ProfileImage/1090.
However it did produce an image that is "closer" to correct:
The second suggestions produced no error and it looks to have the same output:
Levels are looking much better
but the color shift is still there.
I actually was using a CYMK profile in addition to the final sRGB profile until I started researching things earlier. That link you gave stated:
WARNING:
If the original image already contains a profile, for example a CMYK profile, then given two profile conversions is a bad idea.
As my sample has a CMYK profile already embedded, I pulled it. Do my examples above match what you see?
Thanks again..
Re: identify: no pixels defined in cache `XXXXX' @ c
Posted: 2010-02-26T15:25:34-07:00
by fmw42
yes my result also show a pink face. but the cmyk profile should not be pulled out even if in the image, if IM cannot read or recognize that it is there (as I understood that page). what happens when you put it back in and remove the -colorspace RGB?
(Note, I am no expert on -profiles)
Re: identify: no pixels defined in cache `XXXXX' @ c
Posted: 2010-02-26T16:27:47-07:00
by Moonshine
Adding the CMYK profile back in there at the beginning seemed to give me the same output as if it wasn't included. At least with this image, which has a CMYK SWOP profile embedded. Basically:
Code: Select all
convert -profile USWebCoatedSWOP.icc test-cmyk.jpg -resize 600x600! -unsharp 0.5x0.4+0.8+0.1 -quality '80' -profile sRGB.icc test-rgb.jpg
Results in:
BUT......
I kept fiddling with things and it appears that the order of the profile arguments with respect to other arguments is now important in 6.6:
Code: Select all
convert test-cmyk.jpg -profile USWebCoatedSWOP.icc -profile sRGB.icc -resize 600x600! -unsharp 0.5x0.4+0.8+0.1 -quality '80' test-rgb.jpg
Results in:
While tossing them in at the end:
Code: Select all
convert test-cmyk.jpg -resize 600x600! -unsharp 0.5x0.4+0.8+0.1 -quality '80' -profile USWebCoatedSWOP.icc -profile sRGB.icc test-rgb.jpg
Gives the poor output I was seeing.
I imagine this will trip some other people up also, but at least now I can go to happy hour... happy.