Page 1 of 1

Color problem during convert

Posted: 2009-02-25T18:33:45-07:00
by ariel
Hi,

Good day!

I am trying to process images, but it seems that during conversion with imagemagick the resulting image have problems in color. I need to process image which will get it's original color.

I hope anybody could help me on this.

Thank you.

Re: Color problem during convert

Posted: 2009-02-25T18:36:04-07:00
by fmw42
ariel wrote:Hi,

Good day!

I am trying to process images, but it seems that during conversion with imagemagick the resulting image have problems in color. I need to process image which will get it's original color.

I hope anybody could help me on this.

Thank you.

Please specify more details and provide an example if possible.

Re: Color problem during convert

Posted: 2009-02-25T21:40:05-07:00
by ariel
I am currently using ImageMagick 6.4.6. I use these commands to get more specified output.

convert -resample 100x100 -units PixelsPerInch image.pdf -colorspace RGB -gravity center -background white -crop 325x225+0+0 +repage image.jpg

Here is the actual image

Image

and the output look like this. Base on this command I run.

Image

You can notice that the color of "6501 1m" of the image is different from the actual image. Also the upper color of the image (orange color) . I think the quality of the image changes during I run convert........ command.

Thank you.

Re: Color problem during convert

Posted: 2009-02-26T10:32:45-07:00
by fmw42
ariel wrote:I am currently using ImageMagick 6.4.6. I use these commands to get more specified output.

convert -resample 100x100 -units PixelsPerInch image.pdf -colorspace RGB -gravity center -background white -crop 325x225+0+0 +repage image.jpg

Here is the actual image

Image

and the output look like this. Base on this command I run.

Image

You can notice that the color of "6501 1m" of the image is different from the actual image. Also the upper color of the image (orange color) . I think the quality of the image changes during I run convert........ command.

Thank you.
No images are showing! You must host them from your own server or a public picture site. This forum has no way to upload them.

Re: Color problem during convert

Posted: 2009-02-26T16:37:18-07:00
by ariel
Hi,

Sorry for the inconvenience. I hope this will work fine now.
Here is the image


*Original Image (this is a pdf file)
Image



*Processed Image (jpeg output)
Image



Thanks. :)

Re: Color problem during convert

Posted: 2009-02-26T17:36:11-07:00
by fmw42
Instead of -resample try increasing the density and then make up for it by resizing by the inverse as per

convert -density 400 INPUT.pdf -resize 25% OUTPUT.jpg

or resize smaller if you want.

Also you can control the jpg quality with -quality or use a lossless image format


see
http://www.imagemagick.org/script/comma ... hp#density
http://www.imagemagick.org/script/comma ... hp#quality
http://www.imagemagick.org/Usage/formats/#jpg
http://www.imagemagick.org/script/comma ... php#resize
http://www.imagemagick.org/Usage/formats/#other

Re: Color problem during convert

Posted: 2009-02-26T18:24:07-07:00
by ariel
I got the same output. But still trying to work on other possibilities.

Thanks.

Re: Color problem during convert

Posted: 2009-02-26T19:24:47-07:00
by fmw42
From the images you posted, the colors look the same, only a decrease in quality due to jpeg compression and making the image smaller. So I am not sure what is your real issue with this image. Can you clarify?