summaryrefslogtreecommitdiff
path: root/src/format
diff options
context:
space:
mode:
authorTazyFoundSoup <gardendistrict0x0@outlook.com>2026-01-28 19:55:39 +1100
committerTazyFoundSoup <gardendistrict0x0@outlook.com>2026-01-28 20:03:58 +1100
commitf8ce98574f3f1e4f314de15be7fc66f307348618 (patch)
tree2dd5030a5703e27e30fbaca0403ddc39ee70ff3b /src/format
parent206fddad198c18daeeac070893ed8f08fa511042 (diff)
chore: Remove recent update comments
Diffstat (limited to 'src/format')
-rw-r--r--src/format/image/png.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/format/image/png.c b/src/format/image/png.c
index 89891d7..f21b42b 100644
--- a/src/format/image/png.c
+++ b/src/format/image/png.c
@@ -118,8 +118,8 @@ ff_result ff_png_palette_handler(uint8_t *buf, size_t len, ff_png_ctx *ctx)
// There's 4 bytes per entry just because if there's
// a tRNS chunk later, we can just fill in the alpha values
ctx->palette[i * 4 + 0] = buf[i * 3 + 0]; // R
- ctx->palette[i * 4 + 1] = buf[i * 3 + 1]; // R
- ctx->palette[i * 4 + 2] = buf[i * 3 + 2]; // R
+ ctx->palette[i * 4 + 1] = buf[i * 3 + 1]; // G
+ ctx->palette[i * 4 + 2] = buf[i * 3 + 2]; // B
}
return FF_RESULT_OK;
@@ -128,14 +128,11 @@ ff_result ff_png_palette_handler(uint8_t *buf, size_t len, ff_png_ctx *ctx)
ff_result ff_png_data_handler(uint8_t *buf, size_t len, ff_png_ctx *ctx)
{
ff_dprintf("png: IDAT chunk received (len=%zu)\n", len);
-
- // Update: Now I got tinf integrated, I can actually implement this
uint8_t *uncompressed_data = NULL;
// Getting the size is weird cause it could the sample count
// could be different based on color type and bit depth
- // Update: Now we have a bpp helper function
size_t uncompressed_size = ctx->width * ctx->height * ff_png_bpp(ctx);
uncompressed_data = malloc(uncompressed_size);