diff options
| author | Paul Eggert | 2019-05-21 08:51:48 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-05-21 08:52:22 -0700 |
| commit | cb367c8e0d4a881acf8255e1ff6bdd6442efb538 (patch) | |
| tree | 212d886393dd26c0c85d52a342e5e7a73f34d347 /src/image.c | |
| parent | 8ff7807aa7c21f80798f36829edc17d4f6c1677e (diff) | |
| download | emacs-cb367c8e0d4a881acf8255e1ff6bdd6442efb538.tar.gz emacs-cb367c8e0d4a881acf8255e1ff6bdd6442efb538.zip | |
Pacify libpng on interlaced images (Bug#35843)
* src/image.c (png_set_interlace_handling) [WINDOWSNT]:
New function to link.
(init_png_functions): Link it.
(png_load_body): Call it before calling png_read_update_info.
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/image.c b/src/image.c index 35ca3e2d66d..57b405f6db9 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -5802,6 +5802,7 @@ DEF_DLL_FN (png_uint_32, png_get_valid, (png_structp, png_infop, png_uint_32)); | |||
| 5802 | DEF_DLL_FN (void, png_set_strip_16, (png_structp)); | 5802 | DEF_DLL_FN (void, png_set_strip_16, (png_structp)); |
| 5803 | DEF_DLL_FN (void, png_set_expand, (png_structp)); | 5803 | DEF_DLL_FN (void, png_set_expand, (png_structp)); |
| 5804 | DEF_DLL_FN (void, png_set_gray_to_rgb, (png_structp)); | 5804 | DEF_DLL_FN (void, png_set_gray_to_rgb, (png_structp)); |
| 5805 | DEF_DLL_FN (int, png_set_interlace_handling, (png_structp)); | ||
| 5805 | DEF_DLL_FN (void, png_set_background, | 5806 | DEF_DLL_FN (void, png_set_background, |
| 5806 | (png_structp, png_color_16p, int, int, double)); | 5807 | (png_structp, png_color_16p, int, int, double)); |
| 5807 | DEF_DLL_FN (png_uint_32, png_get_bKGD, | 5808 | DEF_DLL_FN (png_uint_32, png_get_bKGD, |
| @@ -5840,6 +5841,7 @@ init_png_functions (void) | |||
| 5840 | LOAD_DLL_FN (library, png_set_strip_16); | 5841 | LOAD_DLL_FN (library, png_set_strip_16); |
| 5841 | LOAD_DLL_FN (library, png_set_expand); | 5842 | LOAD_DLL_FN (library, png_set_expand); |
| 5842 | LOAD_DLL_FN (library, png_set_gray_to_rgb); | 5843 | LOAD_DLL_FN (library, png_set_gray_to_rgb); |
| 5844 | LOAD_DLL_FN (library, png_set_interlace_handling); | ||
| 5843 | LOAD_DLL_FN (library, png_set_background); | 5845 | LOAD_DLL_FN (library, png_set_background); |
| 5844 | LOAD_DLL_FN (library, png_get_bKGD); | 5846 | LOAD_DLL_FN (library, png_get_bKGD); |
| 5845 | LOAD_DLL_FN (library, png_read_update_info); | 5847 | LOAD_DLL_FN (library, png_read_update_info); |
| @@ -5875,6 +5877,7 @@ init_png_functions (void) | |||
| 5875 | # undef png_set_background | 5877 | # undef png_set_background |
| 5876 | # undef png_set_expand | 5878 | # undef png_set_expand |
| 5877 | # undef png_set_gray_to_rgb | 5879 | # undef png_set_gray_to_rgb |
| 5880 | # undef png_set_interlace_handling | ||
| 5878 | # undef png_set_longjmp_fn | 5881 | # undef png_set_longjmp_fn |
| 5879 | # undef png_set_read_fn | 5882 | # undef png_set_read_fn |
| 5880 | # undef png_set_sig_bytes | 5883 | # undef png_set_sig_bytes |
| @@ -5899,6 +5902,7 @@ init_png_functions (void) | |||
| 5899 | # define png_set_background fn_png_set_background | 5902 | # define png_set_background fn_png_set_background |
| 5900 | # define png_set_expand fn_png_set_expand | 5903 | # define png_set_expand fn_png_set_expand |
| 5901 | # define png_set_gray_to_rgb fn_png_set_gray_to_rgb | 5904 | # define png_set_gray_to_rgb fn_png_set_gray_to_rgb |
| 5905 | # define png_set_interlace_handling fn_png_set_interlace_handling | ||
| 5902 | # define png_set_longjmp_fn fn_png_set_longjmp_fn | 5906 | # define png_set_longjmp_fn fn_png_set_longjmp_fn |
| 5903 | # define png_set_read_fn fn_png_set_read_fn | 5907 | # define png_set_read_fn fn_png_set_read_fn |
| 5904 | # define png_set_sig_bytes fn_png_set_sig_bytes | 5908 | # define png_set_sig_bytes fn_png_set_sig_bytes |
| @@ -6213,7 +6217,7 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) | |||
| 6213 | } | 6217 | } |
| 6214 | } | 6218 | } |
| 6215 | 6219 | ||
| 6216 | /* Update info structure. */ | 6220 | png_set_interlace_handling (png_ptr); |
| 6217 | png_read_update_info (png_ptr, info_ptr); | 6221 | png_read_update_info (png_ptr, info_ptr); |
| 6218 | 6222 | ||
| 6219 | /* Get number of channels. Valid values are 1 for grayscale images | 6223 | /* Get number of channels. Valid values are 1 for grayscale images |