1 new commit in xemacs-21.4:
https://bitbucket.org/xemacs/xemacs-21.4/changeset/bcefd94fa651/
changeset: bcefd94fa651
user: Vin Shelton
date: 2012-07-12 09:28:52
summary: Support libpng-1.5.10
affected #: 2 files
diff -r 2cf343fcb482fa6644675f3174c3c0712c53c074 -r
bcefd94fa6513d48f4dc8519f633b2df66b553bc src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-12 Vin Shelton <acs(a)xemacs.org>
+
+ * glyphs-eimage.c: Fix this so it compiles with libpng-1.5.10.
+ Thanks to Aidan, Julian and Hans de Graaff.
+
2011-08-05 Stephen J. Turnbull <stephen(a)xemacs.org>
There are only (octal) 0200 ASCII characters, and only 128 values
supplied in the definition.
diff -r 2cf343fcb482fa6644675f3174c3c0712c53c074 -r
bcefd94fa6513d48f4dc8519f633b2df66b553bc src/glyphs-eimage.c
--- a/src/glyphs-eimage.c
+++ b/src/glyphs-eimage.c
@@ -937,8 +937,8 @@
{
int y, padding;
unsigned char **row_pointers;
- height = info_ptr->height;
- width = info_ptr->width;
+ height = png_get_image_height(png_ptr, info_ptr);
+ width = png_get_image_width(png_ptr, info_ptr);
/* Wow, allocate all the memory. Truly, exciting.
Well, yes, there's excitement to be had. It turns out that libpng
@@ -999,19 +999,19 @@
/* Now that we're using EImage, ask for 8bit RGB triples for any type
of image*/
/* convert palette images to full RGB */
- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE)
png_set_expand (png_ptr);
/* send grayscale images to RGB too */
- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY ||
- info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY ||
+ png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA)
png_set_gray_to_rgb (png_ptr);
/* tell libpng to strip 16 bit depth files down to 8 bits */
- if (info_ptr->bit_depth == 16)
+ if (png_get_bit_depth(png_ptr, info_ptr) == 16)
png_set_strip_16 (png_ptr);
/* if the image is < 8 bits, pad it out */
- if (info_ptr->bit_depth < 8)
+ if (png_get_bit_depth(png_ptr, info_ptr) < 8)
{
- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY)
+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY)
png_set_expand (png_ptr);
else
png_set_packing (png_ptr);
@@ -1021,7 +1021,7 @@
png_read_update_info ensures the alpha flag is set when one of
the transforms above causes an alpha channel to be generated */
png_read_update_info (png_ptr, info_ptr);
- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
+ if (png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA)
png_set_strip_alpha (png_ptr);
png_read_image (png_ptr, row_pointers);
@@ -1036,17 +1036,22 @@
* from lisp anyway. - WMP
*/
{
- int i;
+ int i, num_text = 0;
+ png_textp text_ptr = NULL;
- for (i = 0 ; i < info_ptr->num_text ; i++)
+ if (png_get_text (png_ptr, info_ptr, &text_ptr, &num_text) > 0)
{
- /* How paranoid do I have to be about no trailing NULLs, and
- using (int)info_ptr->text[i].text_length, and strncpy and a temp
- string somewhere? */
+ for (i = 0 ; i < num_text ; i++)
+ {
- warn_when_safe (Qpng, Qinfo, "%s - %s",
- info_ptr->text[i].key,
- info_ptr->text[i].text);
+ /* How paranoid do I have to be about no trailing NULLs, and
+ using (int)info_ptr->text[i].text_length, and strncpy and a temp
+ string somewhere? */
+
+ warn_when_safe (Qpng, Qinfo, "%s - %s",
+ text_ptr[i].key, text_ptr[i].text);
+ }
+
}
}
#endif
Repository URL:
https://bitbucket.org/xemacs/xemacs-21.4/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches