Hi everyone,
when I convert a pdf to an image the value and saturation seems wrong, but by adding -colorspace sRGB corrects the output image. Now I want to do the same in magick++ but I can't find the equivalent procedure.
I already try with colorSpace(sRGBColorspace) but it does nothing. Does anyone know how to do this with magick++?
The imagemagick's version is: 6.7.7-10
-colorspace sRGB equivalent in magick++?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: -colorspace sRGB equivalent in magick++?
There was a change in IM handling of colorspace about that time. You would be best to upgrade your version of IM and Magick++. Your version is about 120 releases old.The imagemagick's version is: 6.7.7-10
see
viewtopic.php?f=4&t=21269
Re: -colorspace sRGB equivalent in magick++?
Thanks for your reply,
I update my imagemagick and is now 6.9.0-0, or at least that is what says convert -version:
My OS right now is: ubuntu 14.04
I update my imagemagick and is now 6.9.0-0, or at least that is what says convert -version:
I also configure CodeBlocks to use magick++ 6.9.0-0 but is behaving the same as 6.7.7-10Version: ImageMagick 6.9.0-0 Q16 x86_64 2014-11-17 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr lzma openexr pangocairo png tiff x xml zlib
My OS right now is: ubuntu 14.04
Last edited by danieru on 2014-11-18T00:44:57-07:00, edited 1 time in total.
Re: -colorspace sRGB equivalent in magick++?
Just to clarify, this is the image I get if convert a pdf to an image using imagemagick without -colorspace sRGB.
It is also what I get if only open the pdf and save it using magick++
http://s11.postimg.org/uf4eg2wf5/Blender.jpg
And this is the image I get if I add -colorspace sRGB. This is also how I see it on Evince.
http://s27.postimg.org/s0wx6n1o1/Blenders_RGB.jpg
This is the image that I want to obtain with Magick++
[Mod note: The two images didn't show, so I added them as links.]
It is also what I get if only open the pdf and save it using magick++
Code: Select all
convert -density 72 -quality 90% Blender.pdf[0] Blender.jpg
http://s11.postimg.org/uf4eg2wf5/Blender.jpg
And this is the image I get if I add -colorspace sRGB. This is also how I see it on Evince.
Code: Select all
convert -density 72 -quality 90% -colorspace sRGB Blender.pdf[0] BlendersRGB.jpg
http://s27.postimg.org/s0wx6n1o1/Blenders_RGB.jpg
This is the image that I want to obtain with Magick++
[Mod note: The two images didn't show, so I added them as links.]
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: -colorspace sRGB equivalent in magick++?
Your jpg image is CMYK. If your command below is not good color quality, then you should use profiles. Also -quality should come after reading the input and just before the output. It does not use %.
With profiles and assuming the pdf is CMYK like the jpg, use
or from the jpg below, which produces a result that is very close to what you want
Code: Select all
convert -density 72 -quality 90% -colorspace sRGB Blender.pdf[0] BlendersRGB.jpg
Code: Select all
convert -density 72 Blender.pdf[0] -profile /path2profile/USWebCoatedSWOP.icc -profile /path2profile/sRGB.icc -quality 90 BlendersRGB.jpg
Code: Select all
convert Blender.jpg -profile /path2profile/USWebCoatedSWOP.icc -profile /path2profile/sRGB.icc -quality 90 BlendersRGB.jpg
Re: -colorspace sRGB equivalent in magick++?
No no, the color with this command is okay for me. I'm just asking how to do the same that -colorspace sRGB does but with Magick++.If your command below is not good color quality
But if it not possible, then something similar.
It's weird, because it seems like it should in gimp but not on gTumb or Firefox.With profiles and assuming the pdf is CMYK like the jpg, useCode: Select all
convert -density 72 Blender.pdf[0] -profile /path2profile/USWebCoatedSWOP.icc -profile /path2profile/sRGB.icc -quality 90 BlendersRGB.jpg
Screenshot
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: -colorspace sRGB equivalent in magick++?
Sorry, I do not know Magick++. But see colorspace under image attributes at http://www.imagemagick.org/Magick++/Ima ... Attributes