Hi all,
I'm using convert to crop an image into a circular area with trasparent background.
I'm using:
convert testCrop.jpeg -background transparent -gravity Center -crop 150.0x150.0+0+0 -resize '136.0' -vignette 1x1+2+2 circ6.png
with ImageMagick 6.7.1-0 2011-07-25 Q16
On this particular image the cropping is "inverted" as expected, on other images works fine.
Any idea?
Thanks in advance
Circular cropping seems not working on some pics
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Circular cropping seems not working on some pics
Your image is cmyk. Try converting to rgb before doing your processing.
Re: Circular cropping seems not working on some pics
Hi, thanks a lot for replying.
Yes if I convert to RGB than the cropping is ok.
Is there a way to add this conversion to the cropping command line? (I'm doing that in an application where I don't know what kind of pictures users add)
In the conversion process, if converting an already RGB is there some possible problem?
Thanks again
Yes if I convert to RGB than the cropping is ok.
Is there a way to add this conversion to the cropping command line? (I'm doing that in an application where I don't know what kind of pictures users add)
In the conversion process, if converting an already RGB is there some possible problem?
Thanks again
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Circular cropping seems not working on some pics
I do not think it will change anything if you have RGB and add -colorspace RGB. Try it on a few images and see. But I will defer to the IM experts. However, converting from cmyk to rgb may give better quality if you use profiles. But then you have to find out what input profile you have. Either way, you could look in the verbose info: for the image and pick out what colorspace and/or any profiles and use that information to put in the appropriate command in your script.
-
- Posts: 1944
- Joined: 2010-08-28T11:16:00-07:00
- Authentication code: 8675308
- Location: Montreal, Canada
Re: Circular cropping seems not working on some pics
I think that the embedded ICC profile for this image may be broken: 3 band ICC for a 4 band CMYK.