Color problem during convert

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
ariel

Color problem during convert

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Color problem during convert

Post 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.
ariel

Re: Color problem during convert

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Color problem during convert

Post 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.
ariel

Re: Color problem during convert

Post 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. :)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Color problem during convert

Post 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
ariel

Re: Color problem during convert

Post by ariel »

I got the same output. But still trying to work on other possibilities.

Thanks.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Color problem during convert

Post 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?
Post Reply