diff options
Diffstat (limited to 'source/blender/imbuf/intern/oiio/openimageio_api.cpp')
-rw-r--r-- | source/blender/imbuf/intern/oiio/openimageio_api.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.cpp b/source/blender/imbuf/intern/oiio/openimageio_api.cpp index e001b8b21c4..4746cec41d4 100644 --- a/source/blender/imbuf/intern/oiio/openimageio_api.cpp +++ b/source/blender/imbuf/intern/oiio/openimageio_api.cpp @@ -194,7 +194,7 @@ struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspac { struct ImBuf *ibuf = NULL; int width, height, components; - bool is_float, is_alpha; + bool is_float, is_alpha, is_half; int basesize; char file_colorspace[IM_MAX_SPACE]; const bool is_colorspace_manually_set = (colorspace[0] != '\0'); @@ -243,6 +243,7 @@ struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspac is_alpha = spec.alpha_channel != -1; basesize = spec.format.basesize(); is_float = basesize > 1; + is_half = spec.format == TypeDesc::HALF; /* we only handle certain number of components */ if (!(components >= 1 && components <= 4)) { @@ -271,6 +272,7 @@ struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspac ibuf->ftype = IMB_FTYPE_PSD; ibuf->channels = 4; ibuf->planes = (3 + (is_alpha ? 1 : 0)) * 4 << basesize; + ibuf->flags |= (is_float && is_half) ? IB_halffloat : 0; try { return ibuf; |