Commit | Line | Data |
---|---|---|
e1026ba7 NG |
1 | Description: Fix for libpng 1.6 |
2 | Author: Programmer Nerd <theprogrammernerd@gmail.com> | |
3 | Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=743388#20 | |
4 | Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=743388 | |
5 | Reviewed-by: Tobias Frost <tobi@debian.org>> | |
6 | Last-Update: 2016-04-07 | |
7 | --- | |
8 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
9 | --- a/src/t4k_loaders.c | |
10 | +++ b/src/t4k_loaders.c | |
11 | @@ -1028,12 +1028,9 @@ | |
12 | { | |
13 | png_init_io(png_ptr, fi); | |
14 | ||
15 | - info_ptr->width = surf->w; | |
16 | - info_ptr->height = surf->h; | |
17 | - info_ptr->bit_depth = 8; | |
18 | - info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA; | |
19 | - info_ptr->interlace_type = 1; | |
20 | - info_ptr->valid = 0; /* will be updated by various png_set_FOO() functions */ | |
21 | + png_set_IHDR(png_ptr, info_ptr, surf->w, surf->h, 8, | |
22 | + PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE, | |
23 | + PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); | |
24 | ||
25 | png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, | |
26 | PNG_sRGB_INTENT_PERCEPTUAL); |