diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-tcltk/tkimg/files/tkimg-1.4-png2.patch |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-tcltk/tkimg/files/tkimg-1.4-png2.patch')
-rw-r--r-- | dev-tcltk/tkimg/files/tkimg-1.4-png2.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/dev-tcltk/tkimg/files/tkimg-1.4-png2.patch b/dev-tcltk/tkimg/files/tkimg-1.4-png2.patch new file mode 100644 index 000000000000..195e9be43fa7 --- /dev/null +++ b/dev-tcltk/tkimg/files/tkimg-1.4-png2.patch @@ -0,0 +1,36 @@ +--- png/png.c.orig 2010-06-17 06:40:24.000000000 -0700 ++++ png/png.c 2013-04-23 20:57:32.000000000 -0700 +@@ -332,6 +332,16 @@ + png_set_expand(png_ptr); + } + ++ if (png_get_sRGB && png_get_sRGB(png_ptr, info_ptr, &intent)) { ++ png_set_sRGB(png_ptr, info_ptr, intent); ++ } else if (png_get_gAMA) { ++ double gamma; ++ if (!png_get_gAMA(png_ptr, info_ptr, &gamma)) { ++ gamma = 0.45455; ++ } ++ png_set_gamma(png_ptr, 1.0, gamma); ++ } ++ + png_read_update_info(png_ptr,info_ptr); + block.pixelSize = png_get_channels(png_ptr, info_ptr); + block.pitch = png_get_rowbytes(png_ptr, info_ptr); +@@ -353,16 +363,6 @@ + block.offset[3] = 0; + } + +- if (png_get_sRGB && png_get_sRGB(png_ptr, info_ptr, &intent)) { +- png_set_sRGB(png_ptr, info_ptr, intent); +- } else if (png_get_gAMA) { +- double gamma; +- if (!png_get_gAMA(png_ptr, info_ptr, &gamma)) { +- gamma = 0.45455; +- } +- png_set_gamma(png_ptr, 1.0, gamma); +- } +- + png_data= (char **) ckalloc(sizeof(char *) * info_height + + info_height * block.pitch); + |