[librsvg] (#451): Make rsvg-convert detect images larger than pixman's limit
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] (#451): Make rsvg-convert detect images larger than pixman's limit
- Date: Fri, 16 Aug 2019 18:04:23 +0000 (UTC)
commit 90779ad40f9a7d1d6ba294e663973ff9c895d4e0
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Aug 16 12:49:05 2019 -0500
(#451): Make rsvg-convert detect images larger than pixman's limit
Fixes https://gitlab.gnome.org/GNOME/librsvg/issues/451
rsvg-convert.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/rsvg-convert.c b/rsvg-convert.c
index 2df9546a..16e4d64b 100644
--- a/rsvg-convert.c
+++ b/rsvg-convert.c
@@ -458,6 +458,13 @@ main (int argc, char **argv)
scaled_height = dimensions.height;
get_final_size (&scaled_width, &scaled_height, &size_data);
+ if (scaled_width > 32767 || scaled_height > 32767) {
+ g_printerr (_("The resulting image would be larger than 32767 pixels on either dimension.\n"
+ "Librsvg currently cannot render to images bigger than that.\n"
+ "Please specify a smaller size.\n"));
+ exit (1);
+ }
+
if (!format || !strcmp (format, "png"))
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
scaled_width, scaled_height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]