# HG changeset patch # User Miles Bader # Date 1003971228 0 # Node ID 1adbc1480e83cf4db23f53f52105b7310353b8e1 # Parent 6ee20fddfbc5ab765334c9306ba19d7286298755 (png_load): Make sure SPECIFIED_BG is a string. (png_load): BG is a pointer to a structure, not a structure. (gif_format, png_format): Add missing commas. diff -r 6ee20fddfbc5 -r 1adbc1480e83 src/xfns.c --- a/src/xfns.c Wed Oct 24 22:57:22 2001 +0000 +++ b/src/xfns.c Thu Oct 25 00:53:48 2001 +0000 @@ -8615,7 +8615,7 @@ {":relief", IMAGE_INTEGER_VALUE, 0}, {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0} + {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; @@ -8891,11 +8891,11 @@ Lisp_Object specified_bg = image_spec_value (img->spec, QCbackground, NULL); - if (! NILP (specified_bg)) + if (STRINGP (specified_bg)) /* The user specified `:background', use that. */ { XColor color; - if (x_defined_color (f, specified_bg, &color, 0)) + if (x_defined_color (f, XSTRING (specified_bg)->data, &color, 0)) { png_color_16 user_bg; @@ -9031,7 +9031,7 @@ png_color_16 *bg; if (png_get_bKGD (png_ptr, info_ptr, &bg)) { - img->background = lookup_rgb_color (f, bg.red, bg.green, bg.blue); + img->background = lookup_rgb_color (f, bg->red, bg->green, bg->blue); img->background_valid = 1; } } @@ -9854,7 +9854,7 @@ {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":image", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0} + {":image", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0}, {":background", IMAGE_STRING_OR_NIL_VALUE, 0} };