diff --git a/src/add-ons/translators/psd/PSDLoader.cpp b/src/add-ons/translators/psd/PSDLoader.cpp index cdb7e8585d..04c954e3b7 100644 --- a/src/add-ons/translators/psd/PSDLoader.cpp +++ b/src/add-ons/translators/psd/PSDLoader.cpp @@ -47,7 +47,7 @@ PSDLoader::PSDLoader(BPositionIO *src) fCompression = _GetInt16FromStream(fStream); fStreamPos = fStream->Position(); - + fLoaded = true; } @@ -108,6 +108,8 @@ PSDLoader::ColorFormatName(void) return "Multichannel"; case PSD_COLOR_MODE_LAB: return "Lab"; + case PSD_COLOR_MODE_DUOTONE: + return "Duotone"; } return ""; } @@ -154,6 +156,10 @@ PSDLoader::_ColorFormat(void) else if (fChannels > 3) format = PSD_COLOR_FORMAT_LAB_A; break; + case PSD_COLOR_MODE_DUOTONE: + if (fChannels >= 1) + format = PSD_COLOR_FORMAT_DUOTONE; + break; default: break; }; @@ -269,6 +275,7 @@ PSDLoader::Decode(BPositionIO *target) target->Write(imageData[0], rowBytes); break; } + case PSD_COLOR_FORMAT_DUOTONE: case PSD_COLOR_FORMAT_GRAY: case PSD_COLOR_FORMAT_GRAY_A: { diff --git a/src/add-ons/translators/psd/PSDLoader.h b/src/add-ons/translators/psd/PSDLoader.h index 8e41a954e3..b9a8846511 100644 --- a/src/add-ons/translators/psd/PSDLoader.h +++ b/src/add-ons/translators/psd/PSDLoader.h @@ -36,6 +36,7 @@ enum psd_color_mode { PSD_COLOR_MODE_RGB = 3, PSD_COLOR_MODE_CMYK = 4, PSD_COLOR_MODE_MULTICHANNEL = 7, + PSD_COLOR_MODE_DUOTONE = 8, PSD_COLOR_MODE_LAB = 9 }; @@ -51,7 +52,8 @@ enum psd_color_format { PSD_COLOR_FORMAT_CMYK, PSD_COLOR_FORMAT_CMYK_A, PSD_COLOR_FORMAT_LAB, - PSD_COLOR_FORMAT_LAB_A + PSD_COLOR_FORMAT_LAB_A, + PSD_COLOR_FORMAT_DUOTONE };