Update to match changes in upstream bug report.
This commit is contained in:
parent
47998b3724
commit
8334b6ac97
2 changed files with 23 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.21 2011/01/24 14:44:02 wiz Exp $
|
||||
$NetBSD: distinfo,v 1.22 2011/02/28 15:38:12 wiz Exp $
|
||||
|
||||
SHA1 (fltk-1.1.10-source.tar.bz2) = 0d2b34fede91fa78eeaefb893dd70282f73908a8
|
||||
RMD160 (fltk-1.1.10-source.tar.bz2) = f8fc4371811efcc0d6fc73edd0525d8ff87a4faa
|
||||
|
@ -10,4 +10,4 @@ SHA1 (patch-ad) = b04051b14eb0bc74e8ccfe762e367ab8ccb11b80
|
|||
SHA1 (patch-ae) = de29d1be1219c3b17707216a7c54c25a9adb746c
|
||||
SHA1 (patch-af) = 791ba33cfc85e41e0f2b75ce0d1b0d6a378d9d0b
|
||||
SHA1 (patch-ag) = aaeb376acf79b695e8376e7610534d125dff6a86
|
||||
SHA1 (patch-ah) = 581069f6d53a7c8e30fb927b6bd36317997871cc
|
||||
SHA1 (patch-ah) = 8e5bae5af1220e7b5758d8c6bb2bbe5caeffb8d5
|
||||
|
|
|
@ -1,11 +1,21 @@
|
|||
$NetBSD: patch-ah,v 1.5 2011/01/24 14:44:02 wiz Exp $
|
||||
$NetBSD: patch-ah,v 1.6 2011/02/28 15:38:13 wiz Exp $
|
||||
|
||||
Fix build with png-1.5.
|
||||
http://www.fltk.org/str.php?L2542+P0+S-2+C0+I0+E0+Q
|
||||
|
||||
--- src/Fl_PNG_Image.cxx.orig 2006-06-09 16:16:34.000000000 +0000
|
||||
+++ src/Fl_PNG_Image.cxx
|
||||
@@ -75,7 +75,7 @@ Fl_PNG_Image::Fl_PNG_Image(const char *p
|
||||
@@ -66,6 +66,9 @@ Fl_PNG_Image::Fl_PNG_Image(const char *p
|
||||
png_structp pp; // PNG read pointer
|
||||
png_infop info; // PNG info pointers
|
||||
png_bytep *rows; // PNG row pointers
|
||||
+ png_bytep trans_alpha;
|
||||
+ int num_trans;
|
||||
+ png_color_16p trans_color;
|
||||
|
||||
|
||||
// Open the PNG file...
|
||||
@@ -75,7 +78,7 @@ Fl_PNG_Image::Fl_PNG_Image(const char *p
|
||||
pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
|
||||
info = png_create_info_struct(pp);
|
||||
|
||||
|
@ -14,7 +24,7 @@ http://www.fltk.org/str.php?L2542+P0+S-2+C0+I0+E0+Q
|
|||
{
|
||||
Fl::warning("PNG file \"%s\" contains errors!\n", png);
|
||||
return;
|
||||
@@ -87,27 +87,21 @@ Fl_PNG_Image::Fl_PNG_Image(const char *p
|
||||
@@ -87,27 +90,28 @@ Fl_PNG_Image::Fl_PNG_Image(const char *p
|
||||
// Get the image dimensions and convert to grayscale or RGB...
|
||||
png_read_info(pp, info);
|
||||
|
||||
|
@ -23,14 +33,16 @@ http://www.fltk.org/str.php?L2542+P0+S-2+C0+I0+E0+Q
|
|||
png_set_expand(pp);
|
||||
|
||||
- if (info->color_type & PNG_COLOR_MASK_COLOR)
|
||||
- channels = 3;
|
||||
- else
|
||||
- channels = 1;
|
||||
+ channels = png_get_channels(pp, info);
|
||||
+ if (png_get_color_type(pp, info) & PNG_COLOR_MASK_COLOR)
|
||||
channels = 3;
|
||||
else
|
||||
channels = 1;
|
||||
|
||||
- if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
|
||||
- channels ++;
|
||||
-
|
||||
+ png_get_tRNS(pp, info, &trans_alpha, &num_trans, &trans_color);
|
||||
+ if ((png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA) || num_trans)
|
||||
channels ++;
|
||||
|
||||
- w((int)(info->width));
|
||||
- h((int)(info->height));
|
||||
+ w((int)(png_get_image_width(pp, info)));
|
||||
|
|
Loading…
Reference in a new issue