diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/image.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/image.c b/src/image.c index bf594987eb8..3d724a773b6 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -6735,7 +6735,7 @@ my_error_exit (j_common_ptr cinfo) | |||
| 6735 | 6735 | ||
| 6736 | 6736 | ||
| 6737 | /* Init source method for JPEG data source manager. Called by | 6737 | /* Init source method for JPEG data source manager. Called by |
| 6738 | jpeg_read_header() before any data is actually read. See | 6738 | jpeg_read_header before any data is actually read. See |
| 6739 | libjpeg.doc from the JPEG lib distribution. */ | 6739 | libjpeg.doc from the JPEG lib distribution. */ |
| 6740 | 6740 | ||
| 6741 | static void | 6741 | static void |
| @@ -6745,7 +6745,7 @@ our_common_init_source (j_decompress_ptr cinfo) | |||
| 6745 | 6745 | ||
| 6746 | 6746 | ||
| 6747 | /* Method to terminate data source. Called by | 6747 | /* Method to terminate data source. Called by |
| 6748 | jpeg_finish_decompress() after all data has been processed. */ | 6748 | jpeg_finish_decompress after all data has been processed. */ |
| 6749 | 6749 | ||
| 6750 | static void | 6750 | static void |
| 6751 | our_common_term_source (j_decompress_ptr cinfo) | 6751 | our_common_term_source (j_decompress_ptr cinfo) |
| @@ -9456,7 +9456,18 @@ svg_load_image (struct frame *f, struct image *img, char *contents, | |||
| 9456 | See rsvg bug 596114 - "image refs are relative to curdir, not .svg file" | 9456 | See rsvg bug 596114 - "image refs are relative to curdir, not .svg file" |
| 9457 | <https://gitlab.gnome.org/GNOME/librsvg/issues/33>. */ | 9457 | <https://gitlab.gnome.org/GNOME/librsvg/issues/33>. */ |
| 9458 | if (filename) | 9458 | if (filename) |
| 9459 | rsvg_handle_set_base_uri(rsvg_handle, filename); | 9459 | rsvg_handle_set_base_uri (rsvg_handle, filename); |
| 9460 | |||
| 9461 | /* Suppress GCC deprecation warnings starting in librsvg 2.45.1 for | ||
| 9462 | rsvg_handle_write and rsvg_handle_close. FIXME: Use functions | ||
| 9463 | like rsvg_handle_new_from_gfile_sync on newer librsvg versions, | ||
| 9464 | and remove this hack. */ | ||
| 9465 | #if GNUC_PREREQ (4, 6, 0) | ||
| 9466 | #pragma GCC diagnostic push | ||
| 9467 | #endif | ||
| 9468 | #if LIBRSVG_CHECK_VERSION (2, 45, 1) && GNUC_PREREQ (4, 2, 0) | ||
| 9469 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
| 9470 | #endif | ||
| 9460 | 9471 | ||
| 9461 | /* Parse the contents argument and fill in the rsvg_handle. */ | 9472 | /* Parse the contents argument and fill in the rsvg_handle. */ |
| 9462 | rsvg_handle_write (rsvg_handle, (unsigned char *) contents, size, &err); | 9473 | rsvg_handle_write (rsvg_handle, (unsigned char *) contents, size, &err); |
| @@ -9467,6 +9478,10 @@ svg_load_image (struct frame *f, struct image *img, char *contents, | |||
| 9467 | rsvg_handle_close (rsvg_handle, &err); | 9478 | rsvg_handle_close (rsvg_handle, &err); |
| 9468 | if (err) goto rsvg_error; | 9479 | if (err) goto rsvg_error; |
| 9469 | 9480 | ||
| 9481 | #if GNUC_PREREQ (4, 6, 0) | ||
| 9482 | #pragma GCC diagnostic pop | ||
| 9483 | #endif | ||
| 9484 | |||
| 9470 | rsvg_handle_get_dimensions (rsvg_handle, &dimension_data); | 9485 | rsvg_handle_get_dimensions (rsvg_handle, &dimension_data); |
| 9471 | if (! check_image_size (f, dimension_data.width, dimension_data.height)) | 9486 | if (! check_image_size (f, dimension_data.width, dimension_data.height)) |
| 9472 | { | 9487 | { |