diff options
author | jan.dudek | 2008-12-20 02:20:07 +0000 |
---|---|---|
committer | jan.dudek | 2008-12-20 02:20:07 +0000 |
commit | 863be5f46911f2da390e106d3fb40e8cb752260c (patch) | |
tree | 7d58caa2cbda1492575d8776501f8505098bfb13 | |
parent | 83047774827f8d737e2de8193af75931259ba1c1 (diff) | |
download | gdk-pixbuf-psd-863be5f46911f2da390e106d3fb40e8cb752260c.tar.gz gdk-pixbuf-psd-863be5f46911f2da390e106d3fb40e8cb752260c.tar.bz2 |
Support for duotone (interpreted as grayscale)
git-svn-id: http://gdk-pixbuf-psd.googlecode.com/svn/trunk@17 c5539ac3-5556-0410-9a1f-7faf0b045682
-rw-r--r-- | io-psd.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -105,7 +105,7 @@ typedef struct guchar** ch_bufs; /* channels buffers */ guint curr_ch; /* current channel */ guint curr_row; - guint pos; // redundant? + guint pos; guint16* lines_lengths; gboolean finalized; gboolean use_alpha; @@ -350,6 +350,7 @@ gdk_pixbuf__psd_image_load_increment (gpointer context_ptr, if (ctx->color_mode != PSD_MODE_RGB && ctx->color_mode != PSD_MODE_GRAYSCALE && ctx->color_mode != PSD_MODE_CMYK + && ctx->color_mode != PSD_MODE_DUOTONE ) { g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_UNKNOWN_TYPE, @@ -522,7 +523,9 @@ gdk_pixbuf__psd_image_load_increment (gpointer context_ptr, } pixels += gdk_pixbuf_get_rowstride(ctx->pixbuf); } - } else if (ctx->color_mode == PSD_MODE_GRAYSCALE) { + } else if (ctx->color_mode == PSD_MODE_GRAYSCALE || + ctx->color_mode == PSD_MODE_DUOTONE) + { for (int i = 0; i < ctx->height; i++) { for (int j = 0; j < ctx->width; j++) { pixels[3*j+0] = pixels[3*j+1] = pixels[3*j+2] = |