Page 4 of 4

Re: From sRGB to CMYK and gamma?

Posted: 2013-08-23T03:39:17-07:00
by joew
snibgo wrote:"-set colorspace RGB -colorspace sRGB"
The first declares the colorspace to be RGB. The second means "If not already sRGB, convert the pixel values to sRGB." Thus the conversion will occur.

"-set colorspace sRGB -colorspace sRGB"
The first declares the colorspace to be sRGB*. The second means "If not already sRGB, convert the pixel values to sRGB." It is already sRGB, so no conversion will occur.
With this reasoning, the examples I've given in viewtopic.php?p=102045#p102045 should not have given different results. Let's take a look on them again:

Code: Select all

convert -set colorspace RGB  -colorspace RGB  -size 100x100 xc:#bebebe -colorspace sRGB 1.png
convert -set colorspace RGB  -colorspace sRGB -size 100x100 xc:#bebebe -colorspace sRGB 2.png
convert -set colorspace sRGB -colorspace RGB  -size 100x100 xc:#bebebe -colorspace sRGB 3.png
convert -set colorspace sRGB -colorspace sRGB -size 100x100 xc:#bebebe -colorspace sRGB 4.png
You say the "-set colorspace XXX -colorspace XXX" has no effect, since no image is loaded at this time. If that would be true, all four commands would turn into

Code: Select all

convert -size 100x100 xc:#bebebe -colorspace sRGB 1.png
convert -size 100x100 xc:#bebebe -colorspace sRGB 2.png
convert -size 100x100 xc:#bebebe -colorspace sRGB 3.png
convert -size 100x100 xc:#bebebe -colorspace sRGB 4.png
which is exctly the same command. So why do 1.png and 3.png result in a different color than 2.png and 4.png?

BTW: How do I declare colorspace without actually converting anything in PerlMagic? In the docs I've found no hints about colorspace handling at all. By try-and-error I found that

Code: Select all

$image->Set(colorspace=>"XXX");
seems to do the setting and the conversion. How would I declare without converting?

Re: From sRGB to CMYK and gamma?

Posted: 2013-08-23T06:30:18-07:00
by snibgo
See my response at the bottom of page 2.

Sorry, I don't know perl.

Re: From sRGB to CMYK and gamma?

Posted: 2013-08-23T06:45:43-07:00
by holden
Getting back to the original issue- what does the image look like after processing through IM sans any color manipulation? The big problem so far seems to be that they were coming out too dark.

* I work at a photo lab, the biggest color hurdle is simply adjusting one's monitor to the printer. Beyond that different surfaces/papers/process can have subtle, or sometimes big, differences. The tools on our end take care of the colorspace/profiling.

** Just to further complicate things, as an oil painter, I've learned that the color of a piece is largely dependent on the lighting it is displayed in. So more food for thought on subjectivity.

Re: From sRGB to CMYK and gamma?

Posted: 2013-08-23T10:31:08-07:00
by fmw42
What version of IM and platform? What was your exact command that comes out too dark? Can you provide a link to an example input and output?