Re: From sRGB to CMYK and gamma?
Posted: 2013-08-23T03:39:17-07:00
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: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.
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
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
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");