diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2007-11-16 18:43:48 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2007-11-16 18:43:48 +0000 |
| commit | 51b4305a4533e44e509ea9f9bb84083237dd3805 (patch) | |
| tree | 355d137fa88c945e4c183d92a78e42b3d803ecf7 /src/dialogs/export.cpp | |
| parent | update translation for Khmer (diff) | |
| download | inkscape-51b4305a4533e44e509ea9f9bb84083237dd3805.tar.gz inkscape-51b4305a4533e44e509ea9f9bb84083237dd3805.zip | |
Fix: [ 1829427 ] PNG export via cmd line is restricted to 65535x65535
(bzr r4091)
Diffstat (limited to 'src/dialogs/export.cpp')
| -rw-r--r-- | src/dialogs/export.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/dialogs/export.cpp b/src/dialogs/export.cpp index 1b74afb7e..d26a5cde1 100644 --- a/src/dialogs/export.cpp +++ b/src/dialogs/export.cpp @@ -60,6 +60,7 @@ #include "io/sys.h" #include "helper/png-write.h" +#include <png.h> #define SP_EXPORT_MIN_SIZE 1.0 @@ -314,7 +315,7 @@ sp_export_dialog_area_box (GtkWidget * dlg) G_CALLBACK (sp_export_area_x_value_changed), dlg ); - sp_export_spinbutton_new ( "width", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, + sp_export_spinbutton_new ( "width", 0.0, 0.0, PNG_UINT_31_MAX, 0.1, 1.0, us->gobj(), GTK_WIDGET(t->gobj()), 4, 0, _("Width:"), NULL, EXPORT_COORD_PRECISION, 1, G_CALLBACK (sp_export_area_width_value_changed), @@ -330,7 +331,7 @@ sp_export_dialog_area_box (GtkWidget * dlg) G_CALLBACK (sp_export_area_y_value_changed), dlg ); - sp_export_spinbutton_new ( "height", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, + sp_export_spinbutton_new ( "height", 0.0, 0.0, PNG_UINT_31_MAX, 0.1, 1.0, us->gobj(), GTK_WIDGET(t->gobj()), 4, 1, _("Height:"), NULL, EXPORT_COORD_PRECISION, 1, G_CALLBACK (sp_export_area_height_value_changed), dlg ); @@ -1144,8 +1145,8 @@ sp_export_export_clicked (GtkButton */*button*/, GtkObject *base) float const y1 = sp_export_value_get_px(base, "y1"); float const xdpi = sp_export_value_get(base, "xdpi"); float const ydpi = sp_export_value_get(base, "ydpi"); - int const width = int(sp_export_value_get(base, "bmwidth") + 0.5); - int const height = int(sp_export_value_get(base, "bmheight") + 0.5); + unsigned long int const width = int(sp_export_value_get(base, "bmwidth") + 0.5); + unsigned long int const height = int(sp_export_value_get(base, "bmheight") + 0.5); if (filename == NULL || *filename == '\0') { sp_ui_error_dialog(_("You have to enter a filename")); @@ -1178,7 +1179,7 @@ sp_export_export_clicked (GtkButton */*button*/, GtkObject *base) gchar *fn = g_path_get_basename (filename_ext); - gchar *progress_text = g_strdup_printf (_("Exporting %s (%d x %d)"), fn, width, height); + gchar *progress_text = g_strdup_printf (_("Exporting %s (%lu x %lu)"), fn, width, height); g_free (fn); GtkWidget *prog_dlg = create_progress_dialog (base, progress_text); g_free (progress_text); |
