[gimp] Bug 748488 - Unable to export to *.psd
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 748488 - Unable to export to *.psd
- Date: Sun, 26 Apr 2015 19:08:16 +0000 (UTC)
commit 68ba2037c91a779f99a26d8e06fcaabd66b2fe4a
Author: Michael Natterer <mitch gimp org>
Date: Sun Apr 26 15:06:16 2015 -0400
Bug 748488 - Unable to export to *.psd
Fix multiple small but crashing bugs:
- call gegl_init()
- gegl_buffer_get()'s scale must be 1.0 not 0
- don't unref the metadata object twice
plug-ins/file-psd/psd-save.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/plug-ins/file-psd/psd-save.c b/plug-ins/file-psd/psd-save.c
index 376c9a2..81e5440 100644
--- a/plug-ins/file-psd/psd-save.c
+++ b/plug-ins/file-psd/psd-save.c
@@ -261,6 +261,9 @@ run (const gchar *name,
run_mode = param[0].data.d_int32;
+ INIT_I18N ();
+ gegl_init (NULL, NULL);
+
*nreturn_vals = 1;
*return_vals = values;
@@ -324,8 +327,6 @@ run (const gchar *name,
metadata, metadata_flags,
file, NULL);
g_object_unref (file);
-
- g_object_unref (metadata);
}
values[0].data.d_status = GIMP_PDB_SUCCESS;
@@ -1353,8 +1354,12 @@ write_pixel_data (FILE *fd,
for (y = 0; y < height; y += tile_height)
{
int tlen;
- gegl_buffer_get (buffer, GEGL_RECTANGLE (0, y, width, MIN (height - y, tile_height)),
- 0, format, data, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
+ gegl_buffer_get (buffer,
+ GEGL_RECTANGLE (0, y,
+ width,
+ MIN (height - y, tile_height)),
+ 1.0, format, data,
+ GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
tlen = get_compress_channel_data (&data[chan],
width,
MIN(height - y, tile_height),
@@ -1418,8 +1423,12 @@ write_pixel_data (FILE *fd,
for (y = 0; y < height; y += tile_height)
{
int tlen;
- gegl_buffer_get (mbuffer, GEGL_RECTANGLE (0, y, width, MIN (height - y, tile_height)),
- 0, format, data, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
+ gegl_buffer_get (mbuffer,
+ GEGL_RECTANGLE (0, y,
+ width,
+ MIN (height - y, tile_height)),
+ 1.0, format, data,
+ GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
tlen = get_compress_channel_data (&data[0],
width,
MIN(height - y, tile_height),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]