miro
miro copied to clipboard
Add an extra option for colorspace
Hey man, your gem is great, I'm using it and I love, however it can be better. I'm extracting colors from an image in my site, but the colors returned differ a little bit from those of the image. I found out that it's due to the colorspace, I had to change it to sRGB, the problem es that your gem uses the same option (quantize) for quantize and colorpace. I suggest you adding an extra option for the colorspace. I had to do the following in my code:
def image_magick_params
if Miro.histogram?
"':in[0]' -resize :resolution -colors :colors -colorspace \"sRGB\" -quantize :quantize -alpha remove -format %c histogram:info:"
else
"':in[0]' -resize :resolution -colors :colors -colorspace \"sRGB\" -quantize :quantize :out"
end
end