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

Flags in STBImageResize are incorrect #857

Closed
theagentd opened this issue Feb 13, 2023 · 2 comments
Closed

Flags in STBImageResize are incorrect #857

theagentd opened this issue Feb 13, 2023 · 2 comments

Comments

@theagentd
Copy link

Version

3.3.2 (nightly)

Platform

Linux x64, Linux arm64, Linux arm32, macOS x64, macOS arm64, Windows x64, Windows x86, Windows arm64

JDK

Zulu 17, but irrelevant

Module

stb

Bug description

The flags defined in STBImageResize are incorrect.

    /**
     * Set this flag if your texture has premultiplied alpha. Otherwise, stbir will use alpha-weighted resampling (effectively premultiplying, resampling,
     * then unpremultiplying).
     */
    public static final int STBIR_FLAG_ALPHA_PREMULTIPLIED = -1;

    /** The specified alpha channel should be handled as gamma-corrected value even when doing sRGB operations. */
    public static final int STBIR_FLAG_ALPHA_USES_COLORSPACE = -1;

Flags in stb_image_resize.h:

// Set this flag if your texture has premultiplied alpha. Otherwise, stbir will
// use alpha-weighted resampling (effectively premultiplying, resampling,
// then unpremultiplying).
#define STBIR_FLAG_ALPHA_PREMULTIPLIED    (1 << 0)
// The specified alpha channel should be handled as gamma-corrected value even
// when doing sRGB operations.
#define STBIR_FLAG_ALPHA_USES_COLORSPACE  (1 << 1)

Stacktrace or crash log output

No response

@Spasi
Copy link
Member

Spasi commented Feb 15, 2023

Hey @theagentd,

LWJGL 3.2.2-snapshot+9 is now available and includes this fix.

@theagentd
Copy link
Author

Thank you very much! :)

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

No branches or pull requests

2 participants