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

Use JCS_ALPHA_EXTENSIONS to detect JCS_EXT_RGBA support #29

Merged
merged 1 commit into from
Aug 29, 2016

Conversation

CaptainCodeman
Copy link
Contributor

@CaptainCodeman CaptainCodeman commented Aug 22, 2016

I was having trouble trying to use DecodeIntoRGBA on OS X with libjpeg-turbo installed and it was also failing on a Docker alpine install as well. Looking into things further it appears to be also skipping support for that in the unit tests rather than just for libjpeg and you will see the same thing with the output shown in #18

The travis builds also show this being incorrectly skipped, e.g. https://travis-ci.org/pixiv/go-libjpeg/jobs/129381454 has jpeg_test.go:131: This build is not support DecodeIntoRGBA. even for the libjpeg-turbo run.

I believe the problem is in the getJCS_EXT_RGBA function trying to check if an enum has been defined, returning it if it is, but it always returns 0 so any tests based on it fail. I changed it to use the JCS_ALPHA_EXTENSIONS definition which I believe is for this purpose and it works as expected.

@harukasan harukasan merged commit c894906 into pixiv:master Aug 29, 2016
@harukasan
Copy link
Member

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants