Blender V5.0
IMB_imbuf_types.hh File Reference
#include "DNA_vec_types.h"
#include "IMB_imbuf_enums.h"

Go to the source code of this file.

Classes

struct  ImbFormatOptions
struct  DDSData
struct  ImBufByteBuffer
struct  ImBufFloatBuffer
struct  ImBufGPU
struct  ImBuf

Namespaces

namespace  blender
namespace  blender::gpu
namespace  blender::ocio

Macros

#define IMB_FILEPATH_SIZE   1024
#define OPENEXR_HALF   (1 << 8)
#define OPENEXR_MULTIPART   (1 << 9)
#define OPENEXR_CODEC_MASK   (0xF)
#define PNG_16BIT   (1 << 10)
#define RAWTGA   1
#define TIF_16BIT   (1 << 8)
#define TIF_COMPRESS_NONE   (1 << 7)
#define TIF_COMPRESS_DEFLATE   (1 << 6)
#define TIF_COMPRESS_LZW   (1 << 5)
#define TIF_COMPRESS_PACKBITS   (1 << 4)
#define DDS_MAKEFOURCC(ch0, ch1, ch2, ch3)
#define FOURCC_DDS   (DDS_MAKEFOURCC('D', 'D', 'S', ' '))
#define FOURCC_DX10   (DDS_MAKEFOURCC('D', 'X', '1', '0'))
#define FOURCC_DXT1   (DDS_MAKEFOURCC('D', 'X', 'T', '1'))
#define FOURCC_DXT2   (DDS_MAKEFOURCC('D', 'X', 'T', '2'))
#define FOURCC_DXT3   (DDS_MAKEFOURCC('D', 'X', 'T', '3'))
#define FOURCC_DXT4   (DDS_MAKEFOURCC('D', 'X', 'T', '4'))
#define FOURCC_DXT5   (DDS_MAKEFOURCC('D', 'X', 'T', '5'))
ImBuf Preset Profile Tags

Some predefined color space profiles that 8 bit imbufs can represent.

#define IB_PROFILE_NONE   0
#define IB_PROFILE_LINEAR_RGB   1
#define IB_PROFILE_SRGB   2
#define IB_PROFILE_CUSTOM   3

Enumerations

ImBuf Component flags

These flags determine the components of an ImBuf struct.

enum  eImBufFlags {
  IB_byte_data = 1 << 0 , IB_test = 1 << 1 , IB_mem = 1 << 4 , IB_float_data = 1 << 5 ,
  IB_multilayer = 1 << 7 , IB_metadata = 1 << 8 , IB_animdeinterlace = 1 << 9 , IB_uninitialized_pixels = 1 << 10 ,
  IB_alphamode_premul = 1 << 12 , IB_alphamode_detect = 1 << 13 , IB_alphamode_channel_packed = 1 << 14 , IB_alphamode_ignore = 1 << 15 ,
  IB_thumbnail = 1 << 16
}
ImBuf buffer storage
enum  ImBufOwnership { IB_DO_NOT_TAKE_OWNERSHIP = 0 , IB_TAKE_OWNERSHIP = 1 }
Image Buffer
enum  { IB_BITMAPDIRTY = (1 << 1) , IB_RECT_INVALID = (1 << 3) , IB_DISPLAY_BUFFER_INVALID = (1 << 4) , IB_PERSISTENT = (1 << 5) }
 userflags: Flags used internally by blender for image-buffers. More...
ImBuf Color Management Flag
enum  { IMB_COLORMANAGE_IS_DATA = (1 << 0) }

Variables

const char * imb_ext_image []
const char * imb_ext_movie []
const char * imb_ext_audio []

Detailed Description

Image buffer types.

Definition in file IMB_imbuf_types.hh.

Macro Definition Documentation

◆ DDS_MAKEFOURCC

#define DDS_MAKEFOURCC ( ch0,
ch1,
ch2,
ch3 )
Value:
((unsigned long)(unsigned char)(ch0) | ((unsigned long)(unsigned char)(ch1) << 8) | \
((unsigned long)(unsigned char)(ch2) << 16) | ((unsigned long)(unsigned char)(ch3) << 24))
#define long

Definition at line 301 of file IMB_imbuf_types.hh.

◆ FOURCC_DDS

#define FOURCC_DDS   (DDS_MAKEFOURCC('D', 'D', 'S', ' '))

Definition at line 310 of file IMB_imbuf_types.hh.

Referenced by LoadDXTCImage().

◆ FOURCC_DX10

#define FOURCC_DX10   (DDS_MAKEFOURCC('D', 'X', '1', '0'))

Definition at line 311 of file IMB_imbuf_types.hh.

Referenced by LoadDXTCImage().

◆ FOURCC_DXT1

#define FOURCC_DXT1   (DDS_MAKEFOURCC('D', 'X', 'T', '1'))

Definition at line 312 of file IMB_imbuf_types.hh.

Referenced by FlipDXTCImage(), and IMB_gpu_get_compressed_format().

◆ FOURCC_DXT2

#define FOURCC_DXT2   (DDS_MAKEFOURCC('D', 'X', 'T', '2'))

Definition at line 313 of file IMB_imbuf_types.hh.

◆ FOURCC_DXT3

#define FOURCC_DXT3   (DDS_MAKEFOURCC('D', 'X', 'T', '3'))

Definition at line 314 of file IMB_imbuf_types.hh.

Referenced by FlipDXTCImage(), and IMB_gpu_get_compressed_format().

◆ FOURCC_DXT4

#define FOURCC_DXT4   (DDS_MAKEFOURCC('D', 'X', 'T', '4'))

Definition at line 315 of file IMB_imbuf_types.hh.

◆ FOURCC_DXT5

#define FOURCC_DXT5   (DDS_MAKEFOURCC('D', 'X', 'T', '5'))

Definition at line 316 of file IMB_imbuf_types.hh.

Referenced by FlipDXTCImage(), and IMB_gpu_get_compressed_format().

◆ IB_PROFILE_CUSTOM

#define IB_PROFILE_CUSTOM   3

Definition at line 295 of file IMB_imbuf_types.hh.

◆ IB_PROFILE_LINEAR_RGB

◆ IB_PROFILE_NONE

◆ IB_PROFILE_SRGB

◆ IMB_FILEPATH_SIZE

#define IMB_FILEPATH_SIZE   1024

Definition at line 30 of file IMB_imbuf_types.hh.

◆ OPENEXR_CODEC_MASK

◆ OPENEXR_MULTIPART

#define OPENEXR_MULTIPART   (1 << 9)

Definition at line 45 of file IMB_imbuf_types.hh.

Referenced by BKE_image_format_from_imbuf(), and BKE_image_format_to_imbuf().

◆ PNG_16BIT

#define PNG_16BIT   (1 << 10)

◆ RAWTGA

◆ TIF_16BIT

#define TIF_16BIT   (1 << 8)

◆ TIF_COMPRESS_DEFLATE

#define TIF_COMPRESS_DEFLATE   (1 << 6)

◆ TIF_COMPRESS_LZW

#define TIF_COMPRESS_LZW   (1 << 5)

◆ TIF_COMPRESS_NONE

#define TIF_COMPRESS_NONE   (1 << 7)

◆ TIF_COMPRESS_PACKBITS

#define TIF_COMPRESS_PACKBITS   (1 << 4)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
IMB_COLORMANAGE_IS_DATA 

Definition at line 334 of file IMB_imbuf_types.hh.

◆ anonymous enum

anonymous enum

userflags: Flags used internally by blender for image-buffers.

Enumerator
IB_BITMAPDIRTY 

image needs to be saved is not the same as filename

IB_RECT_INVALID 

float buffer changed, needs recreation of byte rect

IB_DISPLAY_BUFFER_INVALID 

either float or byte buffer changed, need to re-calculate display buffers

IB_PERSISTENT 

image buffer is persistent in the memory and should never be removed from the cache

Definition at line 273 of file IMB_imbuf_types.hh.

◆ eImBufFlags

Enumerator
IB_byte_data 

Image has byte data (unsigned 0..1 range in a byte, always 4 channels).

IB_test 
IB_mem 
IB_float_data 

Image has float data (usually 1..4 channels, 32 bit float per channel).

IB_multilayer 
IB_metadata 
IB_animdeinterlace 
IB_uninitialized_pixels 

Do not clear image pixel buffer to zero. Without this flag, allocating a new ImBuf does clear the pixel data to zero (transparent black). If whole pixel data is overwritten after allocation, then this flag can be faster since it avoids a memory clear.

IB_alphamode_premul 

indicates whether image on disk have premul alpha

IB_alphamode_detect 

if this flag is set, alpha mode would be guessed from file

IB_alphamode_channel_packed 
IB_alphamode_ignore 

ignore alpha on load and substitute it with 1.0f

IB_thumbnail 

Definition at line 87 of file IMB_imbuf_types.hh.

◆ ImBufOwnership

Enumerator
IB_DO_NOT_TAKE_OWNERSHIP 
IB_TAKE_OWNERSHIP 

Definition at line 122 of file IMB_imbuf_types.hh.

Variable Documentation

◆ imb_ext_audio

const char* imb_ext_audio[]
extern

Sort of wrong having audio extensions in imbuf.

Definition at line 89 of file source/blender/imbuf/intern/util.cc.

Referenced by BPyInit__bpy_path(), and ED_path_extension_type().

◆ imb_ext_image

const char* imb_ext_image[]
extern

Known image extensions, in most cases these match values for images which Blender creates, there are some exceptions to this.

See BKE_image_path_ext_from_imformat which also stores known extensions.

Definition at line 30 of file source/blender/imbuf/intern/util.cc.

Referenced by BPyInit__bpy_path(), do_ensure_image_extension(), ED_path_extension_type(), and studiolight_add_file().

◆ imb_ext_movie

const char* imb_ext_movie[]
extern