Cleanup: rename IMB_FTYPE_{IMAGIC=>IRIS} to confirm with other defines

Use the term IRIS to match the file naming for this format as well as
R_IMF_IMTYPE_IRIS.

Ref !137073
This commit is contained in:
Campbell Barton
2025-04-07 09:23:49 +00:00
parent 6977c15b51
commit c9c59cfa8e
6 changed files with 10 additions and 10 deletions

View File

@@ -135,7 +135,7 @@ int BKE_imtype_to_ftype(const char imtype, ImbFormatOptions *r_options)
return IMB_FTYPE_TGA;
}
if (imtype == R_IMF_IMTYPE_IRIS) {
return IMB_FTYPE_IMAGIC;
return IMB_FTYPE_IRIS;
}
if (imtype == R_IMF_IMTYPE_RADHDR) {
return IMB_FTYPE_RADHDR;
@@ -188,7 +188,7 @@ char BKE_ftype_to_imtype(const int ftype, const ImbFormatOptions *options)
if (ftype == IMB_FTYPE_NONE) {
return R_IMF_IMTYPE_TARGA;
}
if (ftype == IMB_FTYPE_IMAGIC) {
if (ftype == IMB_FTYPE_IRIS) {
return R_IMF_IMTYPE_IRIS;
}
if (ftype == IMB_FTYPE_RADHDR) {
@@ -668,7 +668,7 @@ void BKE_image_format_to_imbuf(ImBuf *ibuf, const ImageFormatData *imf)
ibuf->foptions.flag = 0;
if (imtype == R_IMF_IMTYPE_IRIS) {
ibuf->ftype = IMB_FTYPE_IMAGIC;
ibuf->ftype = IMB_FTYPE_IRIS;
}
else if (imtype == R_IMF_IMTYPE_RADHDR) {
ibuf->ftype = IMB_FTYPE_RADHDR;
@@ -867,7 +867,7 @@ void BKE_image_format_from_imbuf(ImageFormatData *im_format, const ImBuf *imbuf)
BKE_image_format_init(im_format, false);
/* file type */
if (ftype == IMB_FTYPE_IMAGIC) {
if (ftype == IMB_FTYPE_IRIS) {
im_format->imtype = R_IMF_IMTYPE_IRIS;
}
else if (ftype == IMB_FTYPE_RADHDR) {

View File

@@ -20,7 +20,7 @@ enum eImbFileType {
IMB_FTYPE_JPG = 3,
IMB_FTYPE_BMP = 4,
IMB_FTYPE_OPENEXR = 5,
IMB_FTYPE_IMAGIC = 6,
IMB_FTYPE_IRIS = 6,
IMB_FTYPE_PSD = 7,
#ifdef WITH_OPENJPEG
IMB_FTYPE_JP2 = 8,

View File

@@ -106,7 +106,7 @@ bool imb_save_tga(ImBuf *ibuf, const char *filepath, int flags);
/** \} */
/* -------------------------------------------------------------------- */
/** \name Format: IRIS (#IMB_FTYPE_IMAGIC)
/** \name Format: IRIS (#IMB_FTYPE_IRIS)
* \{ */
bool imb_is_a_iris(const unsigned char *mem, size_t size);

View File

@@ -79,7 +79,7 @@ const ImFileType IMB_FILE_TYPES[] = {
/*load_filepath_thumbnail*/ nullptr,
/*save*/ imb_saveiris,
/*flag*/ 0,
/*filetype*/ IMB_FTYPE_IMAGIC,
/*filetype*/ IMB_FTYPE_IRIS,
/*default_save_role*/ COLOR_ROLE_DEFAULT_BYTE,
},
#ifdef WITH_CINEON

View File

@@ -261,7 +261,7 @@ ImBuf *imb_loadiris(const uchar *mem, size_t size, int flags, ImFileColorSpace &
if (flags & IB_test) {
ibuf = IMB_allocImBuf(image.xsize, image.ysize, 8 * image.zsize, 0);
if (ibuf) {
ibuf->ftype = IMB_FTYPE_IMAGIC;
ibuf->ftype = IMB_FTYPE_IRIS;
}
return ibuf;
}
@@ -539,7 +539,7 @@ ImBuf *imb_loadiris(const uchar *mem, size_t size, int flags, ImFileColorSpace &
if (dirty_flag) {
fprintf(stderr, "longimagedata: corrupt file content (%d)\n", dirty_flag);
}
ibuf->ftype = IMB_FTYPE_IMAGIC;
ibuf->ftype = IMB_FTYPE_IRIS;
if (ibuf->byte_buffer.data) {
IMB_convert_rgba_to_abgr(ibuf);

View File

@@ -41,7 +41,7 @@ const char *imb_ext_image[] = {
/* #IMB_FTYPE_JPG */
".jpg",
".jpeg",
/* #IMB_FTYPE_IMAGIC */
/* #IMB_FTYPE_IRIS */
".sgi",
".rgb",
".rgba",