mirror of
https://github.com/GTNewHorizons/lwjgl3ify.git
synced 2026-11-27 23:45:50 +00:00
Fix decoding of transparent indexed pngs in the spng loader
This commit is contained in:
1 parent
0fda85575f
commit
f0b7d8783c
2 files changed
+8
-1
No files matched your search
@@ -67,6 +67,8 @@ dependencies {
|
||||
runtimeOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.35-GTNH:dev')
|
||||
// runtimeOnlyNonPublishable('com.github.GTNewHorizons:inventory-tweaks:1.7.1:dev')
|
||||
// runtimeOnlyNonPublishable('maven.modrinth:cursormod:1.2.2-1.7.10')
|
||||
// runtimeOnlyNonPublishable(rfg.deobf("curse.maven:fplib-665627:7244842"))
|
||||
// runtimeOnlyNonPublishable(rfg.deobf("curse.maven:mcpatcher-1344779:7032456"))
|
||||
if (addGtForTesting) {
|
||||
runtimeOnlyNonPublishable('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.104:dev')
|
||||
runtimeOnlyNonPublishable("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-739-GTNH:dev")
|
||||
|
||||
@@ -139,7 +139,12 @@ public class NativeBackedImage extends BufferedImage implements AutoCloseable {
|
||||
spngCheck(SPNG.spng_get_ihdr(ctx, ihdr));
|
||||
|
||||
imageBuffer = MemoryUtil.nmemAlloc(outSizeI);
|
||||
final int decodeEc = SPNG.nspng_decode_image(ctx, imageBuffer, outSizeI, SPNG.SPNG_FMT_RGBA8, 0);
|
||||
final int decodeEc = SPNG.nspng_decode_image(
|
||||
ctx,
|
||||
imageBuffer,
|
||||
outSizeI,
|
||||
SPNG.SPNG_FMT_RGBA8,
|
||||
SPNG.SPNG_DECODE_TRNS | SPNG.SPNG_DECODE_GAMMA);
|
||||
if (decodeEc != 0) {
|
||||
MemoryUtil.nmemFree(imageBuffer);
|
||||
spngCheck(decodeEc);
|
||||
|
||||
Reference in new issue
Block a user