Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an extra option for colorspace #39

Open
fmonroy opened this issue Apr 11, 2018 · 0 comments
Open

Add an extra option for colorspace #39

fmonroy opened this issue Apr 11, 2018 · 0 comments

Comments

@fmonroy
Copy link

fmonroy commented Apr 11, 2018

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant