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

Make transformations colorspace-aware #531

Open
christeredvartsen opened this issue Mar 29, 2017 · 0 comments
Open

Make transformations colorspace-aware #531

christeredvartsen opened this issue Mar 29, 2017 · 0 comments
Labels
bug Something isn't working

Comments

@christeredvartsen
Copy link
Member

Currently the image transformations doesn't really care too much about the colorspace of the images (sRGB / CMYK and so on), and this can cause some issues.

The main issues arise when the transformation takes some sort of color value as input, and applies this to the image.

The Imbo\Image\Transformation\Transformation::formatColor method is used for generating a hex-representation of the color, which causes imagick to handle the images as sRGB. If this method could take colorspace as an argument it could instead generate values such as:

  • rgb(255, 0, 0)
  • rgba(255, 0, 0, 1.0)
  • cmyk(0.9, 0.48, 0.83, 0.50)

Some initial tests showed that when Imagick::newImage was given a color of cmyk(0.9, 0.48, 0.83, 0.50) it would create an image with the correct colorspace at least.

This issue is added to the 3.0 milestone, but should be back-ported to the imbo-2.x branch as well.

@christeredvartsen christeredvartsen added the bug Something isn't working label Mar 29, 2017
@christeredvartsen christeredvartsen added this to the Imbo-3.0 milestone Mar 29, 2017
@christeredvartsen christeredvartsen self-assigned this Mar 29, 2017
@christeredvartsen christeredvartsen removed their assignment Sep 4, 2021
@christeredvartsen christeredvartsen removed this from the Imbo-3.0 milestone Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant