45 memcpy(imf_dst, imf_src,
sizeof(*imf_dst));
71 memset(r_options, 0,
sizeof(*r_options));
85 return IMB_FTYPE_RADHDR;
102 return IMB_FTYPE_TIF;
110 return IMB_FTYPE_CINEON;
113 return IMB_FTYPE_DPX;
118 r_options->
flag |= JP2_JP2;
120 return IMB_FTYPE_JP2;
126 return IMB_FTYPE_WEBP;
143 if (ftype == IMB_FTYPE_RADHDR) {
151 if (ftype == IMB_FTYPE_DDS) {
159 if (ftype == IMB_FTYPE_TIF) {
167 if (ftype == IMB_FTYPE_CINEON) {
170 if (ftype == IMB_FTYPE_DPX) {
182 if (ftype == IMB_FTYPE_JP2) {
187 if (ftype == IMB_FTYPE_WEBP) {
323 if (
STREQ(imtype_arg,
"TGA")) {
326 if (
STREQ(imtype_arg,
"IRIS")) {
330 if (
STREQ(imtype_arg,
"DDS")) {
334 if (
STREQ(imtype_arg,
"JPEG")) {
337 if (
STREQ(imtype_arg,
"IRIZ")) {
340 if (
STREQ(imtype_arg,
"RAWTGA")) {
343 if (
STREQ(imtype_arg,
"AVIRAW")) {
346 if (
STREQ(imtype_arg,
"AVIJPEG")) {
349 if (
STREQ(imtype_arg,
"PNG")) {
352 if (
STREQ(imtype_arg,
"BMP")) {
356 if (
STREQ(imtype_arg,
"HDR")) {
361 if (
STREQ(imtype_arg,
"TIFF")) {
366 if (
STREQ(imtype_arg,
"OPEN_EXR")) {
369 if (
STREQ(imtype_arg,
"OPEN_EXR_MULTILAYER")) {
372 if (
STREQ(imtype_arg,
"EXR")) {
375 if (
STREQ(imtype_arg,
"MULTILAYER")) {
379 if (
STREQ(imtype_arg,
"FFMPEG")) {
383 if (
STREQ(imtype_arg,
"CINEON")) {
386 if (
STREQ(imtype_arg,
"DPX")) {
391 if (
STREQ(imtype_arg,
"JP2")) {
396 if (
STREQ(imtype_arg,
"WEBP")) {
410 const char *extension =
nullptr;
411 const char *extension_test;
416 extension = extension_test;
421 extension = extension_test;
427 extension = extension_test;
431 else if (
ELEM(imtype,
438 extension = extension_test;
444 extension = extension_test;
450 extension = extension_test;
455 extension = extension_test;
461 extension = extension_test;
465 #ifdef WITH_OPENIMAGEIO
468 extension = extension_test;
475 extension = extension_test;
482 extension = extension_test;
487 extension = extension_test;
496 extension = extension_test;
501 extension = extension_test;
505 BLI_assert_msg(0,
"Unsupported jp2 codec was specified in im_format->jp2_codec");
510 extension = extension_test;
518 extension = extension_test;
524 extension = extension_test;
558 const bool use_frames,
561 if (
string ==
nullptr) {
586 const bool use_frames,
590 string, base, relbase, frame, im_format->
imtype, im_format, use_ext, use_frames, suffix);
599 const bool use_frames,
602 do_makepicstring(
string, base, relbase, frame, imtype,
nullptr, use_ext, use_frames, suffix);
610 char imtype = imf->
imtype;
622 ibuf->
ftype = IMB_FTYPE_RADHDR;
625 else if (
ELEM(imtype,
643 ibuf->
ftype = IMB_FTYPE_DDS;
651 ibuf->
ftype = IMB_FTYPE_TIF;
686 ibuf->
ftype = IMB_FTYPE_CINEON;
701 ibuf->
ftype = IMB_FTYPE_DPX;
728 ibuf->
ftype = IMB_FTYPE_JP2;
756 BLI_assert_msg(0,
"Unsupported jp2 codec was specified in im_format->jp2_codec");
762 ibuf->
ftype = IMB_FTYPE_WEBP;
779 int ftype = imbuf->
ftype;
790 else if (ftype == IMB_FTYPE_RADHDR) {
805 else if (ftype == IMB_FTYPE_DDS) {
813 else if (ftype == IMB_FTYPE_TIF) {
815 if (custom_flags & TIF_16BIT) {
818 if (custom_flags & TIF_COMPRESS_NONE) {
821 if (custom_flags & TIF_COMPRESS_DEFLATE) {
824 if (custom_flags & TIF_COMPRESS_LZW) {
827 if (custom_flags & TIF_COMPRESS_PACKBITS) {
849 else if (ftype == IMB_FTYPE_CINEON) {
852 else if (ftype == IMB_FTYPE_DPX) {
857 if (custom_flags &
RAWTGA) {
865 else if (ftype == IMB_FTYPE_JP2) {
869 if (custom_flags & JP2_16BIT) {
872 else if (custom_flags & JP2_12BIT) {
876 if (custom_flags & JP2_YCC) {
880 if (custom_flags & JP2_CINE) {
882 if (custom_flags & JP2_CINE_48FPS) {
887 if (custom_flags & JP2_JP2) {
890 else if (custom_flags & JP2_J2K) {
894 BLI_assert_msg(0,
"Unsupported jp2 codec was specified in file type");
899 else if (ftype == IMB_FTYPE_WEBP) {
944 const Scene *scene_src,
947 *imf = (imf_src) ? *imf_src : scene_src->
r.
im_format;
#define BLI_assert_msg(a, msg)
bool BLI_path_extension_check_array(const char *str, const char **ext_array) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
bool BLI_path_frame(char *path, int frame, int digits) ATTR_NONNULL()
bool BLI_path_extension_ensure(char *path, size_t maxlen, const char *ext) ATTR_NONNULL()
bool BLI_path_extension_replace(char *path, size_t maxlen, const char *ext) ATTR_NONNULL()
bool BLI_path_extension_check(const char *str, const char *ext) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
bool BLI_path_extension_check_n(const char *str,...) ATTR_NONNULL(1) ATTR_SENTINEL(0)
bool BLI_path_abs(char *path, const char *basepath) ATTR_NONNULL()
bool BLI_path_suffix(char *string, size_t maxlen, const char *suffix, const char *sep) ATTR_NONNULL()
#define STRNCPY(dst, src)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
#define DNA_struct_default_get(struct_name)
#define R_IMF_IMTYPE_TARGA
#define R_IMF_IMTYPE_FFMPEG
#define R_IMF_IMTYPE_H264
@ R_IMF_TIFF_CODEC_PACKBITS
@ R_IMF_TIFF_CODEC_DEFLATE
#define R_IMF_IMTYPE_THEORA
#define R_IMF_IMTYPE_CINEON
#define R_IMF_IMTYPE_AVIJPEG
#define R_IMF_IMTYPE_TIFF
#define R_IMF_JP2_CODEC_J2K
#define R_IMF_EXR_CODEC_ZIP
#define R_IMF_IMTYPE_RAWTGA
#define R_IMF_COLOR_MANAGEMENT_OVERRIDE
#define R_IMF_IMTYPE_IRIZ
#define R_IMF_IMTYPE_MULTILAYER
#define R_IMF_JP2_FLAG_CINE_PRESET
#define R_IMF_IMTYPE_IRIS
#define R_IMF_IMTYPE_XVID
#define R_IMF_IMTYPE_WEBP
#define R_IMF_CINEON_FLAG_LOG
#define R_IMF_IMTYPE_AVIRAW
#define R_IMF_IMTYPE_RADHDR
#define R_IMF_JP2_FLAG_YCC
#define R_IMF_JP2_CODEC_JP2
#define R_IMF_JP2_FLAG_CINE_48
#define R_IMF_IMTYPE_INVALID
#define R_IMF_IMTYPE_OPENEXR
#define R_IMF_IMTYPE_JPEG90
@ COLOR_ROLE_SCENE_LINEAR
const char * IMB_colormanagement_role_colorspace_name_get(int role)
void IMB_freezbuffloatImBuf(struct ImBuf *ibuf)
Contains defines and structs used throughout the imbuf module.
const char * imb_ext_image[]
CCL_NAMESPACE_BEGIN struct Options options
SyclQueue void void size_t num_bytes void
ImbFormatOptions foptions
struct ImageFormatData im_format
ColorManagedViewSettings view_settings
ColorManagedDisplaySettings display_settings