Blender V4.3
IMB_imbuf_types.hh File Reference

Contains defines and structs used throughout the imbuf module. More...

#include "DNA_vec_types.h"
#include "BLI_sys_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
 

Macros

#define IMB_MIPMAP_LEVELS   20
 
#define IMB_FILEPATH_SIZE   1024
 
#define OPENEXR_HALF   (1 << 8)
 
#define OPENEXR_COMPRESS   (15)
 
#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_rect = 1 << 0 , IB_test = 1 << 1 , IB_mem = 1 << 4 , IB_rectfloat = 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 , IB_multiview = 1 << 17 , IB_halffloat = 1 << 18
}
 
ImBuf buffer storage
enum  ImBufOwnership { IB_DO_NOT_TAKE_OWNERSHIP = 0 , IB_TAKE_OWNERSHIP = 1 }
 
Image Buffer
enum  {
  IB_BITMAPDIRTY = (1 << 1) , IB_MIPMAP_INVALID = (1 << 2) , 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

Contains defines and structs used throughout the imbuf module.

Todo
Clean up includes.

Types needed for using the image buffer.

ImBuf is external code, slightly adapted to live in the Blender context. It requires an external JPEG module, and the AVI-module (also external code) in order to function correctly.

This file contains types and some constants that go with them. Most are self-explanatory (e.g. IS_amiga tests whether the buffer contains an Amiga-format file).

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))

Definition at line 311 of file IMB_imbuf_types.hh.

◆ FOURCC_DDS

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

Definition at line 320 of file IMB_imbuf_types.hh.

Referenced by LoadDXTCImage().

◆ FOURCC_DX10

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

Definition at line 321 of file IMB_imbuf_types.hh.

Referenced by LoadDXTCImage().

◆ FOURCC_DXT1

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

Definition at line 322 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 323 of file IMB_imbuf_types.hh.

◆ FOURCC_DXT3

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

Definition at line 324 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 325 of file IMB_imbuf_types.hh.

◆ FOURCC_DXT5

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

Definition at line 326 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 305 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 35 of file IMB_imbuf_types.hh.

◆ IMB_MIPMAP_LEVELS

#define IMB_MIPMAP_LEVELS   20

◆ OPENEXR_COMPRESS

◆ 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

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

Enumerator
IB_BITMAPDIRTY 

image needs to be saved is not the same as filename

IB_MIPMAP_INVALID 

image mipmaps are invalid, need recreate

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 281 of file IMB_imbuf_types.hh.

◆ anonymous enum

anonymous enum
Enumerator
IMB_COLORMANAGE_IS_DATA 

Definition at line 338 of file IMB_imbuf_types.hh.

◆ eImBufFlags

Enumerator
IB_rect 
IB_test 
IB_mem 
IB_rectfloat 
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 
IB_multiview 
IB_halffloat 

Definition at line 90 of file IMB_imbuf_types.hh.

◆ ImBufOwnership

Enumerator
IB_DO_NOT_TAKE_OWNERSHIP 
IB_TAKE_OWNERSHIP 

Definition at line 125 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 74 of file source/blender/imbuf/intern/util.cc.

Referenced by ED_path_extension_type().

◆ imb_ext_image

const char* imb_ext_image[]
extern

◆ imb_ext_movie

const char* imb_ext_movie[]
extern