summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2016-09-25 22:50:43 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2016-09-25 22:50:43 +0000
commitefc66f4403df7128ef6ca2ac98893b477abff9bf (patch)
tree5db60591a8d11b79a7bdda1078dce561520b89ce
parentExposes to the user additional PNG settings: Interlacing, grayscale, bit dept... (diff)
downloadinkscape-efc66f4403df7128ef6ca2ac98893b477abff9bf.tar.gz
inkscape-efc66f4403df7128ef6ca2ac98893b477abff9bf.zip
minor fix (+ satisfy build bots (?))
(bzr r15132)
-rw-r--r--src/helper/png-write.cpp10
-rw-r--r--src/ui/dialog/export.cpp7
-rw-r--r--src/ui/dialog/export.h2
3 files changed, 8 insertions, 11 deletions
diff --git a/src/helper/png-write.cpp b/src/helper/png-write.cpp
index f270dcc95..2433e2777 100644
--- a/src/helper/png-write.cpp
+++ b/src/helper/png-write.cpp
@@ -359,14 +359,10 @@ sp_export_get_rows(guchar const **rows, void **to_free, int row, int num_rows, v
// it's identical to the GdkPixbuf format.
convert_pixels_argb32_to_pixbuf(px, ebp->width, num_rows, stride);
- *to_free = px;
-
// If a custom bit depth or color type is asked, then convert rgb to grayscale, etc.
- if(color_type !=6 || bit_depth != 8){
- const guchar* new_data = pixbuf_to_png(rows, px, num_rows, ebp->width, stride, color_type, bit_depth);
- *to_free = (void*) new_data;
- free(px);
- }
+ const guchar* new_data = pixbuf_to_png(rows, px, num_rows, ebp->width, stride, color_type, bit_depth);
+ *to_free = (void*) new_data;
+ free(px);
return num_rows;
}
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index 248714a1b..64a5d9866 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -150,7 +150,8 @@ Export::Export (void) :
bitdepth_cb(),
zlib_label(_("Compression")),
zlib_compression(),
- phys_label(_("pHYs dpi")),
+ pHYs_label(_("pHYs dpi")),
+ pHYs_sb(pHYs_adj, 1.0, 2),
hide_box(false, 5),
hide_export(_("Hide a_ll except selected"), _("In the exported image, hide all objects except those that are selected")),
closeWhenDone(_("Close when complete"), _("Once the export completes, close this dialog")),
@@ -340,7 +341,7 @@ Export::Export (void) :
zlib_compression.append(zlist[i]);
zlib_compression.set_active_text("Z_DEFAULT_COMPRESSION");
pHYs_adj = Gtk::Adjustment::create(0, 0, 100000, 0.1, 1.0, 0);
- pHYs_sb = Gtk::SpinButton(pHYs_adj, 1.0, 2);
+ pHYs_sb.set_adjustment(pHYs_adj);
pHYs_sb.set_width_chars(7);
pHYs_sb.set_tooltip_text( _("Will force-set the physical dpi for the png file. Set this to 72 if you're planning to work on your png with Photoshop") );
zlib_compression.set_hexpand();
@@ -351,7 +352,7 @@ Export::Export (void) :
table->attach(bitdepth_cb,1,1,1,1);
table->attach(zlib_label,0,2,1,1);
table->attach(zlib_compression,1,2,1,1);
- table->attach(phys_label,0,3,1,1);
+ table->attach(pHYs_label,0,3,1,1);
table->attach(pHYs_sb,1,3,1,1);
table->show();
diff --git a/src/ui/dialog/export.h b/src/ui/dialog/export.h
index 84e1c2362..112f42312 100644
--- a/src/ui/dialog/export.h
+++ b/src/ui/dialog/export.h
@@ -324,7 +324,7 @@ private:
Gtk::ComboBoxText bitdepth_cb;
Gtk::Label zlib_label;
Gtk::ComboBoxText zlib_compression;
- Gtk::Label phys_label;
+ Gtk::Label pHYs_label;
Glib::RefPtr<Gtk::Adjustment> pHYs_adj;
Gtk::SpinButton pHYs_sb;