diff --git a/src/trace/depixelize/inkscape-depixelize.cpp b/src/trace/depixelize/inkscape-depixelize.cpp index 41dcca8e753b5a6dbf2b334410a5cf65133b24a0..a61ff8b2a647b0924d4282e30d2c6300cfa0ef2f 100644 --- a/src/trace/depixelize/inkscape-depixelize.cpp +++ b/src/trace/depixelize/inkscape-depixelize.cpp @@ -81,15 +81,17 @@ DepixelizeTracingEngine::~DepixelizeTracingEngine() { delete params; } std::vector DepixelizeTracingEngine::trace(Glib::RefPtr pixbuf) { + std::vector res; + if (pixbuf->get_width() > 256 || pixbuf->get_height() > 256) { char *msg = _("Image looks too big. Process may take a while and it is" " wise to save your document before continuing." "\n\nContinue the procedure (without saving)?"); Gtk::MessageDialog dialog(msg, false, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_OK_CANCEL, true); -// if (dialog.run() != Gtk::RESPONSE_OK) -// return; -// TODO + if (dialog.run() != Gtk::RESPONSE_OK) { + return res; + } } ::Tracer::Splines splines; @@ -99,8 +101,6 @@ std::vector DepixelizeTracingEngine::trace(Glib::RefPtr res; - for (::Tracer::Splines::const_iterator it = splines.begin(), end = splines.end(); it != end; ++it) { gchar b[64]; sp_svg_write_color(b, sizeof(b),