[hackers] [farbfeld] Readd &color || FRIGN
commit d8e77e37dd74d4835977209c3cd57fba3307f6a8
Author: FRIGN <dev_AT_frign.de>
AuthorDate: Mon Jan 4 18:47:38 2016 +0100
Commit: FRIGN <dev_AT_frign.de>
CommitDate: Mon Jan 4 18:47:38 2016 +0100
Readd &color
Somehow, it broke the depth-value on libpng 1.4.*. Should be worth a
bug-report to the libpng-guys, but I can't be arsed right now.
This fucking library is a pain in the ass.
diff --git a/png2ff.c b/png2ff.c
index 101036d..0835d34 100644
--- a/png2ff.c
+++ b/png2ff.c
_AT_@ -13,7 +13,7 @@ main(int argc, char *argv[])
png_structp png_struct_p;
png_infop png_info_p;
png_bytepp png_row_p;
- int depth;
+ int depth, color;
uint32_t width, height, png_row_len, tmp32, r, i;
uint16_t tmp16;
_AT_@ -43,7 +43,7 @@ main(int argc, char *argv[])
png_read_png(png_struct_p, png_info_p, PNG_TRANSFORM_PACKING |
PNG_TRANSFORM_EXPAND, NULL);
png_get_IHDR(png_struct_p, png_info_p, &width, &height, &depth,
- NULL, NULL, NULL, NULL);
+ &color, NULL, NULL, NULL);
png_row_len = png_get_rowbytes(png_struct_p, png_info_p);
png_row_p = png_get_rows(png_struct_p, png_info_p);
Received on Mon Jan 04 2016 - 18:48:44 CET
This archive was generated by hypermail 2.3.0
: Mon Jan 04 2016 - 19:00:16 CET