Skip to content

Commit

Permalink
fix(stb) invalid stb_image_resize flag values
Browse files Browse the repository at this point in the history
Close #857
  • Loading branch information
Spasi committed Feb 13, 2023
1 parent ee2dc3b commit e8bf979
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/notes/3.3.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ This build includes the following changes:
- NanoSVG: Fixed auto-sizing of `NSVGPath::pts` buffer.
- Opus: Fixed `pcm` parameter type of `opus_decode_float` function. (#785)
- Remotery: Fixed `rmtSettings::free` callback signature.
- stb: Fixed `stb_image_resize` flag values. (#857)
- Vulkan: Fixed definition of the `VK_API_VERSION_PATCH` macro. (#743)
- Vulkan: Fixed `EXT_debug_utils` function dispatch. (#755)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ public class STBImageResize {
* 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;
public static final int STBIR_FLAG_ALPHA_PREMULTIPLIED = 1 << 0;

/** 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;
public static final int STBIR_FLAG_ALPHA_USES_COLORSPACE = 1 << 1;

/**
* Edge wrap mode.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ stbir_resize_uint8_srgb_edgemode(
Set this flag if your texture has premultiplied alpha. Otherwise, stbir will use alpha-weighted resampling (effectively premultiplying, resampling,
then unpremultiplying).
""",
"FLAG_ALPHA_PREMULTIPLIED".."-1"
"FLAG_ALPHA_PREMULTIPLIED".."1 << 0"
)
IntConstant(
"The specified alpha channel should be handled as gamma-corrected value even when doing sRGB operations.",
"FLAG_ALPHA_USES_COLORSPACE".."-1"
"FLAG_ALPHA_USES_COLORSPACE".."1 << 1"
)

val EdgeWrapModes = EnumConstant(
Expand Down

0 comments on commit e8bf979

Please sign in to comment.