diff options
| author | Aaron Spike <aaron@ekips.org> | 2006-06-13 01:43:48 +0000 |
|---|---|---|
| committer | acspike <acspike@users.sourceforge.net> | 2006-06-13 01:43:48 +0000 |
| commit | fba8dd39307b922bb440f2755e3901b80d0c3889 (patch) | |
| tree | a46c92793b0b29d83665dd568d8e38e222a332c2 /src/ui/dialog/tracedialog.cpp | |
| parent | patch [ 1504669 ] New win32 icon (diff) | |
| download | inkscape-fba8dd39307b922bb440f2755e3901b80d0c3889.tar.gz inkscape-fba8dd39307b922bb440f2755e3901b80d0c3889.zip | |
patch [ 1503865 ] Siox performance patch
(bzr r1208)
Diffstat (limited to 'src/ui/dialog/tracedialog.cpp')
| -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); |
