diff options
Diffstat (limited to 'io-psd.c')
| -rw-r--r-- | io-psd.c | 7 |
1 files changed, 5 insertions, 2 deletions
| @@ -105,7 +105,7 @@ typedef struct | |||
| 105 | guchar** ch_bufs; /* channels buffers */ | 105 | guchar** ch_bufs; /* channels buffers */ |
| 106 | guint curr_ch; /* current channel */ | 106 | guint curr_ch; /* current channel */ |
| 107 | guint curr_row; | 107 | guint curr_row; |
| 108 | guint pos; // redundant? | 108 | guint pos; |
| 109 | guint16* lines_lengths; | 109 | guint16* lines_lengths; |
| 110 | gboolean finalized; | 110 | gboolean finalized; |
| 111 | gboolean use_alpha; | 111 | gboolean use_alpha; |
| @@ -350,6 +350,7 @@ gdk_pixbuf__psd_image_load_increment (gpointer context_ptr, | |||
| 350 | if (ctx->color_mode != PSD_MODE_RGB | 350 | if (ctx->color_mode != PSD_MODE_RGB |
| 351 | && ctx->color_mode != PSD_MODE_GRAYSCALE | 351 | && ctx->color_mode != PSD_MODE_GRAYSCALE |
| 352 | && ctx->color_mode != PSD_MODE_CMYK | 352 | && ctx->color_mode != PSD_MODE_CMYK |
| 353 | && ctx->color_mode != PSD_MODE_DUOTONE | ||
| 353 | ) { | 354 | ) { |
| 354 | g_set_error (error, GDK_PIXBUF_ERROR, | 355 | g_set_error (error, GDK_PIXBUF_ERROR, |
| 355 | GDK_PIXBUF_ERROR_UNKNOWN_TYPE, | 356 | GDK_PIXBUF_ERROR_UNKNOWN_TYPE, |
| @@ -522,7 +523,9 @@ gdk_pixbuf__psd_image_load_increment (gpointer context_ptr, | |||
| 522 | } | 523 | } |
| 523 | pixels += gdk_pixbuf_get_rowstride(ctx->pixbuf); | 524 | pixels += gdk_pixbuf_get_rowstride(ctx->pixbuf); |
| 524 | } | 525 | } |
| 525 | } else if (ctx->color_mode == PSD_MODE_GRAYSCALE) { | 526 | } else if (ctx->color_mode == PSD_MODE_GRAYSCALE || |
| 527 | ctx->color_mode == PSD_MODE_DUOTONE) | ||
| 528 | { | ||
| 526 | for (int i = 0; i < ctx->height; i++) { | 529 | for (int i = 0; i < ctx->height; i++) { |
| 527 | for (int j = 0; j < ctx->width; j++) { | 530 | for (int j = 0; j < ctx->width; j++) { |
| 528 | pixels[3*j+0] = pixels[3*j+1] = pixels[3*j+2] = | 531 | pixels[3*j+0] = pixels[3*j+1] = pixels[3*j+2] = |
