Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 278653 Details for
Bug 373521
libpng-1.5 fix for x11-libs/fltk-1.10.1-r2
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fltk-1.1.10-libpng1.5.patch
fltk-1.1.10-libpng1.5.patch (text/plain), 1.95 KB, created by
Stuart Longland (RETIRED)
on 2011-06-30 00:15:21 UTC
(
hide
)
Description:
fltk-1.1.10-libpng1.5.patch
Filename:
MIME Type:
Creator:
Stuart Longland (RETIRED)
Created:
2011-06-30 00:15:21 UTC
Size:
1.95 KB
patch
obsolete
>diff --git a/fltk-1.1.10/src/Fl_PNG_Image.cxx.orig b/fltk-1.1.10/src/Fl_PNG_Image.cxx >index 5c7d5d2..b853609 100644 >--- a/fltk-1.1.10/src/Fl_PNG_Image.cxx.orig >+++ b/fltk-1.1.10/src/Fl_PNG_Image.cxx >@@ -66,7 +66,8 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read > png_structp pp; // PNG read pointer > png_infop info; // PNG info pointers > png_bytep *rows; // PNG row pointers >- >+ png_byte color_type; // PNG color type >+ png_byte bit_depth; // PNG bit depth > > // Open the PNG file... > if ((fp = fopen(png, "rb")) == NULL) return; >@@ -75,7 +76,7 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read > pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); > info = png_create_info_struct(pp); > >- if (setjmp(pp->jmpbuf)) >+ if (setjmp(png_jmpbuf(pp))) > { > Fl::warning("PNG file \"%s\" contains errors!\n", png); > return; >@@ -86,28 +87,24 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read > > // Get the image dimensions and convert to grayscale or RGB... > png_read_info(pp, info); >+ color_type = png_get_color_type(pp, info); > >- if (info->color_type == PNG_COLOR_TYPE_PALETTE) >+ if (color_type == PNG_COLOR_TYPE_PALETTE) > png_set_expand(pp); > >- if (info->color_type & PNG_COLOR_MASK_COLOR) >- channels = 3; >- else >- channels = 1; >- >- if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans) >- channels ++; >+ channels = png_get_channels(pp, info); > >- w((int)(info->width)); >- h((int)(info->height)); >+ w((int)(png_get_image_width(pp, info))); >+ h((int)(png_get_image_height(pp, info))); > d(channels); > >- if (info->bit_depth < 8) >+ bit_depth = png_get_bit_depth(pp, info); >+ if (bit_depth < 8) > { > png_set_packing(pp); > png_set_expand(pp); > } >- else if (info->bit_depth == 16) >+ else if (bit_depth == 16) > png_set_strip_16(pp); > > # if defined(HAVE_PNG_GET_VALID) && defined(HAVE_PNG_SET_TRNS_TO_ALPHA)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 373521
: 278653