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

instance ColorConvertible PixelYA8 PixelRGB8 loses data #118

Open
nomeata opened this issue Jan 2, 2016 · 3 comments
Open

instance ColorConvertible PixelYA8 PixelRGB8 loses data #118

nomeata opened this issue Jan 2, 2016 · 3 comments
Labels

Comments

@nomeata
Copy link

nomeata commented Jan 2, 2016

According to the docs, promotePixel should not lose any data, but yet

instance ColorConvertible PixelYA8 PixelRGB8 where
    {-# INLINE promotePixel #-}
    promotePixel (PixelYA8 y _) = PixelRGB8 y y y

Maybe the instance should receive a haddock comment warning about this, or the docs of promotePixel should indicate that alpha channel information can be lost.

@Twinside
Copy link
Owner

Twinside commented Jan 2, 2016

Clearly inconsistent, I'd like to remove the instance, but bumping the major version number for this tiny case bug me a little.

There is a need to think about it.

@Twinside Twinside added the bug label Jan 2, 2016
@nomeata
Copy link
Author

nomeata commented Jan 2, 2016

I actually make use of the instance now... but I can work around its removal.

@Twinside
Copy link
Owner

Twinside commented Jan 3, 2016

I also found myself abusing it in the test cases, but i guess adding a deprecated pragma is way to go with a bump of the documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants