diff options
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/dialog/tracedialog.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ui/dialog/tracedialog.cpp b/src/ui/dialog/tracedialog.cpp index b79d0f0e6..967ed4327 100644 --- a/src/ui/dialog/tracedialog.cpp +++ b/src/ui/dialog/tracedialog.cpp @@ -232,20 +232,19 @@ void TraceDialogImpl::potraceProcess(bool do_i_trace) pte.setMultiScanSmooth(do_i_smooth); //##### Get intermediate bitmap image - GdkPixbuf *pixbuf = tracer.getSelectedImage(); + Glib::RefPtr<Gdk::Pixbuf> pixbuf = tracer.getSelectedImage(); if (pixbuf) { - GdkPixbuf *preview = pte.preview(pixbuf); + Glib::RefPtr<Gdk::Pixbuf> preview = pte.preview(pixbuf); if (preview) { - Glib::RefPtr<Gdk::Pixbuf> thePreview = Glib::wrap(preview); - int width = thePreview->get_width(); - int height = thePreview->get_height(); + int width = preview->get_width(); + int height = preview->get_height(); double scaleFactor = 100.0 / (double)height; int newWidth = (int) (((double)width) * scaleFactor); int newHeight = (int) (((double)height) * scaleFactor); Glib::RefPtr<Gdk::Pixbuf> scaledPreview = - thePreview->scale_simple(newWidth, newHeight, + preview->scale_simple(newWidth, newHeight, Gdk::INTERP_NEAREST); //g_object_unref(preview); potracePreviewImage.set(scaledPreview); |
