Cleanup: imbuf callback naming
Use `is_a` & `is_a_filepath` in callback names.
This commit is contained in:
parent
e118426e46
commit
af4c389f99
|
@ -119,7 +119,7 @@ struct ImBuf *imb_bmp_decode(const unsigned char *mem,
|
|||
int imb_savebmp(struct ImBuf *ibuf, const char *filepath, int flags);
|
||||
|
||||
/* cineon */
|
||||
int imb_is_cineon(const unsigned char *buf);
|
||||
int imb_is_a_cineon(const unsigned char *buf);
|
||||
int imb_save_cineon(struct ImBuf *buf, const char *filepath, int flags);
|
||||
struct ImBuf *imb_load_cineon(const unsigned char *mem,
|
||||
size_t size,
|
||||
|
@ -127,7 +127,7 @@ struct ImBuf *imb_load_cineon(const unsigned char *mem,
|
|||
char colorspace[IM_MAX_SPACE]);
|
||||
|
||||
/* dpx */
|
||||
int imb_is_dpx(const unsigned char *buf);
|
||||
int imb_is_a_dpx(const unsigned char *buf);
|
||||
int imb_save_dpx(struct ImBuf *buf, const char *filepath, int flags);
|
||||
struct ImBuf *imb_load_dpx(const unsigned char *mem,
|
||||
size_t size,
|
||||
|
|
|
@ -188,7 +188,7 @@ int imb_save_cineon(struct ImBuf *buf, const char *filepath, int flags)
|
|||
return imb_save_dpx_cineon(buf, filepath, 1, flags);
|
||||
}
|
||||
|
||||
int imb_is_cineon(const unsigned char *buf)
|
||||
int imb_is_a_cineon(const unsigned char *buf)
|
||||
{
|
||||
return logImageIsCineon(buf);
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ ImBuf *imb_load_cineon(const unsigned char *mem,
|
|||
int flags,
|
||||
char colorspace[IM_MAX_SPACE])
|
||||
{
|
||||
if (imb_is_cineon(mem)) {
|
||||
if (imb_is_a_cineon(mem)) {
|
||||
return imb_load_dpx_cineon(mem, size, 1, flags, colorspace);
|
||||
}
|
||||
return NULL;
|
||||
|
@ -209,7 +209,7 @@ int imb_save_dpx(struct ImBuf *buf, const char *filepath, int flags)
|
|||
return imb_save_dpx_cineon(buf, filepath, 0, flags);
|
||||
}
|
||||
|
||||
int imb_is_dpx(const unsigned char *buf)
|
||||
int imb_is_a_dpx(const unsigned char *buf)
|
||||
{
|
||||
return logImageIsDpx(buf);
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ ImBuf *imb_load_dpx(const unsigned char *mem,
|
|||
int flags,
|
||||
char colorspace[IM_MAX_SPACE])
|
||||
{
|
||||
if (imb_is_dpx(mem)) {
|
||||
if (imb_is_a_dpx(mem)) {
|
||||
return imb_load_dpx_cineon(mem, size, 0, flags, colorspace);
|
||||
}
|
||||
return NULL;
|
||||
|
|
|
@ -114,7 +114,7 @@ const ImFileType IMB_FILE_TYPES[] = {
|
|||
#ifdef WITH_CINEON
|
||||
{NULL,
|
||||
NULL,
|
||||
imb_is_dpx,
|
||||
imb_is_a_dpx,
|
||||
NULL,
|
||||
imb_ftype_default,
|
||||
imb_load_dpx,
|
||||
|
@ -126,7 +126,7 @@ const ImFileType IMB_FILE_TYPES[] = {
|
|||
COLOR_ROLE_DEFAULT_FLOAT},
|
||||
{NULL,
|
||||
NULL,
|
||||
imb_is_cineon,
|
||||
imb_is_a_cineon,
|
||||
NULL,
|
||||
imb_ftype_default,
|
||||
imb_load_cineon,
|
||||
|
@ -211,7 +211,7 @@ const ImFileType IMB_FILE_TYPES[] = {
|
|||
{NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
imb_is_a_photoshop,
|
||||
imb_is_a_filepath_photoshop,
|
||||
imb_ftype_default,
|
||||
NULL,
|
||||
imb_load_photoshop,
|
||||
|
|
|
@ -163,7 +163,7 @@ static ImBuf *imb_oiio_load_image_float(
|
|||
|
||||
extern "C" {
|
||||
|
||||
int imb_is_a_photoshop(const char *filename)
|
||||
int imb_is_a_filepath_photoshop(const char *filename)
|
||||
{
|
||||
const char *photoshop_extension[] = {
|
||||
".psd",
|
||||
|
@ -198,7 +198,7 @@ struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspac
|
|||
const bool is_colorspace_manually_set = (colorspace[0] != '\0');
|
||||
|
||||
/* load image from file through OIIO */
|
||||
if (imb_is_a_photoshop(filename) == 0) {
|
||||
if (imb_is_a_filepath_photoshop(filename) == 0) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ extern "C" {
|
|||
|
||||
struct ImBuf;
|
||||
|
||||
int imb_is_a_photoshop(const char *name);
|
||||
int imb_is_a_filepath_photoshop(const char *name);
|
||||
|
||||
int imb_save_photoshop(struct ImBuf *ibuf, const char *name, int flags);
|
||||
|
||||
|
|
Loading…
Reference in New Issue