[gimp/soc-2013-psd: 6/10] file-psd: Fix errors with GEGL code.
- From: Simon Lui <simonlui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2013-psd: 6/10] file-psd: Fix errors with GEGL code.
- Date: Mon, 28 Oct 2013 00:45:03 +0000 (UTC)
commit 154db6ebc8a02b83f3086c11b3b6cfced60c5f3a
Author: Simon Lui <simonlui src gnome org>
Date: Tue Aug 27 21:41:33 2013 -0400
file-psd: Fix errors with GEGL code.
plug-ins/file-psd/psd-save.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/plug-ins/file-psd/psd-save.c b/plug-ins/file-psd/psd-save.c
index b16c814..28357c5 100644
--- a/plug-ins/file-psd/psd-save.c
+++ b/plug-ins/file-psd/psd-save.c
@@ -1299,13 +1299,13 @@ write_pixel_data (FILE *fd,
IFDBG printf (" Function: write_pixel_data, drw %d, lto %d\n",
drawableID, ltable_offset);
- switch (gimp_drawable_type (drawableID)
+ switch (gimp_drawable_type (drawableID))
{
- case GIMP_GREY_IMAGE:
+ case GIMP_GRAY_IMAGE:
format = babl_format ("Y' u8");
break;
- case GIMP_GREYA_IMAGE:
+ case GIMP_GRAYA_IMAGE:
format = babl_format ("Y'A u8");
break;
@@ -1379,7 +1379,7 @@ write_pixel_data (FILE *fd,
{
int tlen;
gegl_buffer_get (buffer, GEGL_RECTANGLE (0, y, width, MIN (height - y, tile_height)),
- format, data, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
+ 0, format, data, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
tlen = get_compress_channel_data (&data[chan],
width,
MIN(height - y, tile_height),
@@ -1444,7 +1444,7 @@ write_pixel_data (FILE *fd,
{
int tlen;
gegl_buffer_get (mbuffer, GEGL_RECTANGLE (0, y, width, MIN (height - y, tile_height)),
- format, data, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
+ 0, format, data, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
tlen = get_compress_channel_data (&data[0],
width,
MIN(height - y, tile_height),
@@ -1544,20 +1544,19 @@ create_merged_image (gint32 image_id)
GeglBufferIterator *iter;
const Babl *format = NULL;
gboolean transparency_found = FALSE;
- gpointer pr;
gint n_components;
int bpp;
iter = gegl_buffer_iterator_new (buffer, NULL, 0, format,
GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
- switch (gimp_drawable_type (drawableID)
+ switch (gimp_drawable_type (projection))
{
- case GIMP_GREY_IMAGE:
+ case GIMP_GRAY_IMAGE:
format = babl_format ("Y' u8");
break;
- case GIMP_GREYA_IMAGE:
+ case GIMP_GRAYA_IMAGE:
format = babl_format ("Y'A u8");
break;
@@ -1575,6 +1574,9 @@ create_merged_image (gint32 image_id)
bpp = babl_format_get_bytes_per_pixel (format);
n_components = babl_format_get_n_components (format);
+ iter = gegl_buffer_iterator_new (buffer, NULL, 0, format,
+ GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
+
while (gegl_buffer_iterator_next (iter))
{
guchar *data = iter->data[0];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]