gegl r2815 - in trunk: . operations/external
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2815 - in trunk: . operations/external
- Date: Sat, 6 Dec 2008 13:33:52 +0000 (UTC)
Author: ok
Date: Sat Dec 6 13:33:52 2008
New Revision: 2815
URL: http://svn.gnome.org/viewvc/gegl?rev=2815&view=rev
Log:
* operations/external/png-save.c: (gegl_buffer_export_png),
(process): allow forcing the bitdepth down to 8bit.
Modified:
trunk/ChangeLog
trunk/operations/external/png-save.c
Modified: trunk/operations/external/png-save.c
==============================================================================
--- trunk/operations/external/png-save.c (original)
+++ trunk/operations/external/png-save.c Sat Dec 6 13:33:52 2008
@@ -27,6 +27,8 @@
_("Target path and filename, use '-' for stdout."))
gegl_chant_int (compression, _("Compression"),
1, 9, 1, _("PNG compression level from 1 to 9"))
+gegl_chant_int (bitdepth, _("Bitdepth"),
+ 8, 16, 16, _("8 and 16 are amongst the currently accepted values."))
#else
@@ -44,6 +46,7 @@
gegl_buffer_export_png (GeglBuffer *gegl_buffer,
const gchar *path,
gint compression,
+ gint bd,
gint src_x,
gint src_y,
gint width,
@@ -53,6 +56,7 @@
gegl_buffer_export_png (GeglBuffer *gegl_buffer,
const gchar *path,
gint compression,
+ gint bd,
gint src_x,
gint src_y,
gint width,
@@ -93,6 +97,11 @@
for (i=0; i<babl->format.components; i++)
if ((*type)->bits > 8)
bit_depth = 16;
+
+ if (bd == 16)
+ bit_depth = 16;
+ else
+ bit_depth = 8;
}
if (bit_depth == 16)
@@ -171,7 +180,7 @@
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
- gegl_buffer_export_png (input, o->path, o->compression,
+ gegl_buffer_export_png (input, o->path, o->compression, o->bitdepth,
result->x, result->y,
result->width, result->height);
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]