Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/image.c
| Show First 20 Lines • Show All 1,615 Lines • ▼ Show 20 Lines | #endif | ||||
| else if (ftype == IMB_FTYPE_BMP) | else if (ftype == IMB_FTYPE_BMP) | ||||
| im_format->imtype = R_IMF_IMTYPE_BMP; | im_format->imtype = R_IMF_IMTYPE_BMP; | ||||
| #ifdef WITH_TIFF | #ifdef WITH_TIFF | ||||
| else if (ftype == IMB_FTYPE_TIF) { | else if (ftype == IMB_FTYPE_TIF) { | ||||
| im_format->imtype = R_IMF_IMTYPE_TIFF; | im_format->imtype = R_IMF_IMTYPE_TIFF; | ||||
| if (custom_flags & TIF_16BIT) | if (custom_flags & TIF_16BIT) | ||||
| im_format->depth = R_IMF_CHAN_DEPTH_16; | im_format->depth = R_IMF_CHAN_DEPTH_16; | ||||
| if (custom_flags & TIF_CPRS_NONE) | |||||
| im_format->tiff_flag = R_IMF_TIFF_FLAG_NONE; | |||||
| if (custom_flags & TIF_CPRS_DEFLATE) | |||||
| im_format->tiff_flag = R_IMF_TIFF_FLAG_DEFLATE; | |||||
| if (custom_flags & TIF_CPRS_LZW) | |||||
| im_format->tiff_flag = R_IMF_TIFF_FLAG_LZW; | |||||
| if (custom_flags & TIF_CPRS_PACKBITS) | |||||
| im_format->tiff_flag = R_IMF_TIFF_FLAG_PACKBITS; | |||||
| } | } | ||||
| #endif | #endif | ||||
| #ifdef WITH_OPENEXR | #ifdef WITH_OPENEXR | ||||
| else if (ftype == IMB_FTYPE_OPENEXR) { | else if (ftype == IMB_FTYPE_OPENEXR) { | ||||
| im_format->imtype = R_IMF_IMTYPE_OPENEXR; | im_format->imtype = R_IMF_IMTYPE_OPENEXR; | ||||
| if (custom_flags & OPENEXR_HALF) | if (custom_flags & OPENEXR_HALF) | ||||
| im_format->depth = R_IMF_CHAN_DEPTH_16; | im_format->depth = R_IMF_CHAN_DEPTH_16; | ||||
| ▲ Show 20 Lines • Show All 566 Lines • ▼ Show 20 Lines | |||||
| #endif | #endif | ||||
| else if (imtype == R_IMF_IMTYPE_BMP) { | else if (imtype == R_IMF_IMTYPE_BMP) { | ||||
| ibuf->ftype = IMB_FTYPE_BMP; | ibuf->ftype = IMB_FTYPE_BMP; | ||||
| } | } | ||||
| #ifdef WITH_TIFF | #ifdef WITH_TIFF | ||||
| else if (imtype == R_IMF_IMTYPE_TIFF) { | else if (imtype == R_IMF_IMTYPE_TIFF) { | ||||
| ibuf->ftype = IMB_FTYPE_TIF; | ibuf->ftype = IMB_FTYPE_TIF; | ||||
| if (imf->depth == R_IMF_CHAN_DEPTH_16) | if (imf->depth == R_IMF_CHAN_DEPTH_16) { | ||||
| ibuf->foptions.flag |= TIF_16BIT; | ibuf->foptions.flag |= TIF_16BIT; | ||||
| } | } | ||||
| if (imf->tiff_flag == R_IMF_TIFF_FLAG_NONE) { | |||||
| ibuf->foptions.flag |= TIF_CPRS_NONE; | |||||
| } | |||||
| else if (imf->tiff_flag == R_IMF_TIFF_FLAG_DEFLATE) { | |||||
| ibuf->foptions.flag |= TIF_CPRS_DEFLATE; | |||||
| } | |||||
| else if (imf->tiff_flag == R_IMF_TIFF_FLAG_LZW) { | |||||
| ibuf->foptions.flag |= TIF_CPRS_LZW; | |||||
| } | |||||
| else if (imf->tiff_flag == R_IMF_TIFF_FLAG_PACKBITS) { | |||||
| ibuf->foptions.flag |= TIF_CPRS_PACKBITS; | |||||
| } | |||||
| } | |||||
| #endif | #endif | ||||
| #ifdef WITH_OPENEXR | #ifdef WITH_OPENEXR | ||||
| else if (ELEM(imtype, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER)) { | else if (ELEM(imtype, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER)) { | ||||
| ibuf->ftype = IMB_FTYPE_OPENEXR; | ibuf->ftype = IMB_FTYPE_OPENEXR; | ||||
| if (imf->depth == R_IMF_CHAN_DEPTH_16) | if (imf->depth == R_IMF_CHAN_DEPTH_16) | ||||
| ibuf->foptions.flag |= OPENEXR_HALF; | ibuf->foptions.flag |= OPENEXR_HALF; | ||||
| ibuf->foptions.flag &= ~OPENEXR_COMPRESS; | ibuf->foptions.flag &= ~OPENEXR_COMPRESS; | ||||
| ibuf->foptions.flag |= (imf->exr_codec & OPENEXR_COMPRESS); | ibuf->foptions.flag |= (imf->exr_codec & OPENEXR_COMPRESS); | ||||
| ▲ Show 20 Lines • Show All 2,473 Lines • Show Last 20 Lines | |||||