I have been using the below to do a color conversion
if @image.colorspace == Magick::CMYKColorspace
# @image.colorspace #=> CMYKColorspace=12
@image.colorspace = Magick::RGBColorspace
@image = @image.negate
end
It works, approximately, but the color luminosity is off. The fact that I need to negate the image leaves a very bad smell.
The documentation mentions using color_profiles, but beyond that I can not find much.
I am now trying
@image = @image.quantize(16777216, Magick::RGBColorspace)
And the colors are better, but still off.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…