56 const char *filepath =
nullptr,
62 const char *filepath =
nullptr,
126 size_t max_thumb_size,
151 unsigned int channels);
157 const float *float_buffer,
160 unsigned int channels);
235 const unsigned char src1[4],
236 const unsigned char src2[4],
253 const int2 &dst_size,
255 const int2 &src_size,
257 const int2 &src_rect_pos,
258 const int2 &dst_rect_pos,
261 const int2 &dst_size,
263 const int2 &src_size,
264 const int2 &src_rect_pos,
265 const int2 &dst_rect_pos,
279 const int2 &src_rect_pos,
280 const int2 &dst_rect_pos,
299 unsigned short *dmask,
300 const unsigned short *curvemask,
301 const unsigned short *texmask,
319 float *dbuf_float_data,
322 unsigned short *dmask,
323 const unsigned short *curvemask,
324 const unsigned short *texmask,
345#define FILTER_MASK_NULL 0
346#define FILTER_MASK_MARGIN 1
347#define FILTER_MASK_USED 2
409 bool threaded =
true);
414 bool threaded =
true)
474 float *dest,
const unsigned char *src,
int width,
int height,
int dest_stride,
int src_stride);
485 float *dest,
const float *src,
int src_channels,
int width,
int height);
492 float *dest,
const float *src,
int src_channels,
int width,
int height,
const char *
mask);
528 ImBuf *ibuf,
const float scene_linear_color[4],
int x1,
int y1,
int x2,
int y2);
536 unsigned int channels,
538 bool initialize_pixels,
539 const char *alloc_name);
609 const rctf *src_crop);
636 bool try_only =
false);
660 bool use_high_bitdepth,
685 bool store_premultiplied,
686 const imbuf::partial_update::Changes &changes,
692 char mode,
bool is_squeezed,
size_t width,
size_t height,
size_t *r_width,
size_t *r_height);
694 char mode,
bool is_squeezed,
size_t width,
size_t height,
size_t *r_width,
size_t *r_height);
698ImBuf *
IMB_stereo3d_ImBuf(
const ImageFormatData *im_format, ImBuf *ibuf_left, ImBuf *ibuf_right);
703 ImBuf *ibuf_stereo3d,
705 ImBuf **r_ibuf_right);
#define ENUM_OPERATORS(_enum_type)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
constexpr T degrees(T) RET
TEX_TEMPLATE DataVec texture(T, FltCoord, float=0.0f) RET
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
ENUM_OPERATORS(Layer::Flags)
void IMB_alpha_under_color_byte(unsigned char *rect, int x, int y, const float backcol[3])
bool IMB_test_image_type_matches(const char *filepath, eImbFileType filetype)
bool IMB_rotate_orthogonal(ImBuf *ibuf, int degrees)
eImbFileType IMB_ftype_from_id(const char *id)
void IMB_buffer_float_rgba_srgb_to_linear(float *buffer, int width, int height)
void IMB_mask_filter_extend(char *mask, int width, int height)
void IMB_activate_gpu_context()
void IMB_float_from_byte_ex(ImBuf *dst, const ImBuf *src, const rcti *region_to_update)
const char ** IMB_ftype_file_extensions(eImbFileType ftype)
ImBuf * IMB_makeSingleUser(ImBuf *ibuf)
void IMB_buffer_float_from_byte(float *dest, const unsigned char *src, int width, int height, int dest_stride, int src_stride)
void IMB_free_byte_pixels(ImBuf *ibuf)
bool IMB_gpu_get_compressed_format(const ImBuf *ibuf, gpu::TextureFormat *r_texture_format)
void IMB_saturation(ImBuf *ibuf, float sat)
void IMB_assign_gpu_texture(ImBuf *ibuf, gpu::Texture *texture)
ImBuf * IMB_allocFromBufferOwn(uint8_t *byte_buffer, float *float_buffer, unsigned int w, unsigned int h, unsigned int channels)
void IMB_rectfill_alpha(ImBuf *ibuf, float value)
void IMB_unpremultiply_alpha(ImBuf *ibuf)
void IMB_mask_clear(ImBuf *ibuf, const char *mask, int val)
size_t IMB_get_pixel_count(const ImBuf *ibuf)
Get the length of the data of the given image buffer in pixels.
Vector< uint8_t > IMB_save_image_to_buffer(ImBuf *ibuf, ImBufFlags flags)
const char * IMB_ftype_to_id(eImbFileType ftype)
bool IMB_alloc_byte_pixels(ImBuf *ibuf, bool initialize_pixels=true)
void IMB_ensure_gpu_context()
void IMB_rect_size_set(ImBuf *ibuf, const uint size[2])
void IMB_rectfill(ImBuf *drect, const float col[4])
gpu::TextureFormat IMB_gpu_get_texture_format(const ImBuf *ibuf, bool high_bitdepth, bool use_grayscale)
void IMB_refImBuf(ImBuf *ibuf)
void IMB_buffer_byte_from_float(unsigned char *dest, const float *src, int src_channels, float dither, bool predivide, int width, int height, int stride, int start_y=0)
bool IMB_initImBuf(ImBuf *ibuf, unsigned int x, unsigned int y, ImBufFlags flags)
void IMB_rectfill_area(ImBuf *ibuf, const float scene_linear_color[4], int x1, int y1, int x2, int y2)
ImBuf * IMB_stereo3d_ImBuf(const ImageFormatData *im_format, ImBuf *ibuf_left, ImBuf *ibuf_right)
void IMB_crop(ImBuf *ibuf, const int2 &rect_pos, const int2 &rect_size)
void IMB_buffer_byte_from_float_mask(unsigned char *dest, const float *src, int src_channels, float dither, int width, int height, const char *mask)
size_t IMB_get_size_in_memory(const ImBuf *ibuf)
ImBuf * IMB_dupImBuf(const ImBuf *ibuf1)
void * imb_alloc_pixels(unsigned int x, unsigned int y, unsigned int channels, size_t typesize, bool initialize_pixels, const char *alloc_name)
bool IMB_save_image(ImBuf *ibuf, const char *filepath, ImBufFlags flags)
void IMB_float_from_byte(ImBuf *ibuf)
ImBuf * IMB_load_image_from_filepath(const char *filepath, ImBufFlags flags, ColorManagedColorspaceSettings *colorspace_settings=nullptr)
void IMB_transform(const ImBuf *src, ImBuf *dst, eIMBTransformMode mode, eIMBInterpolationFilterMode filter, const float3x3 &transform_matrix, const rctf *src_crop)
Transform source image buffer onto destination image buffer using a transform matrix.
void IMB_rectblend(ImBuf *dbuf, uint8_t *dbuf_byte_data, float *dbuf_float_data, const ImBuf *obuf, const ImBuf *sbuf, unsigned short *dmask, const unsigned short *curvemask, const unsigned short *texmask, float mask_max, int destx, int desty, int origx, int origy, int srcx, int srcy, int width, int height, IMB_BlendMode mode, bool accumulate)
void IMB_stereo3d_read_dimensions(char mode, bool is_squeezed, size_t width, size_t height, size_t *r_width, size_t *r_height)
void IMB_freeImBuf(ImBuf *ibuf)
VecBase< int32_t, 2 > int2
void IMB_gpu_clamp_half_float(ImBuf *image_buffer)
void IMB_flipx(ImBuf *ibuf)
eImFileTypeCapability IMB_ftype_capability_read(eImbFileType ftype)
void IMB_flipy(ImBuf *ibuf)
void IMB_stereo3d_write_dimensions(char mode, bool is_squeezed, size_t width, size_t height, size_t *r_width, size_t *r_height)
void IMB_scale_box(const float *src_buffer, int2 src_size, int channels, float *dst_buffer, int2 dst_size, bool threaded, int src_stride=0)
void IMB_ensure_host_buffer(ImBuf *ibuf)
void IMB_rectclip(ImBuf *dbuf, const ImBuf *sbuf, int *destx, int *desty, int *srcx, int *srcy, int *width, int *height)
void IMB_blend_color_float(float dst[4], const float src1[4], const float src2[4], IMB_BlendMode mode)
void IMB_buffer_float_rgba_from_float(float *dest, const float *src, int src_channels, int width, int height)
void IMB_gpu_texture_apply_partial_update(gpu::Texture *tex, ImBuf *ibuf, bool store_premultiplied, const imbuf::partial_update::Changes &changes, int layer=-1, int2 tile_offset=int2(0), int2 tile_size=int2(0))
void IMB_color_to_bw(ImBuf *ibuf)
eIMBInterpolationFilterMode
@ IMB_FILTER_CUBIC_BSPLINE
@ IMB_FILTER_CUBIC_MITCHELL
void IMB_buffer_float_rgba_from_float_mask(float *dest, const float *src, int src_channels, int width, int height, const char *mask)
eImFileTypeCapability IMB_ftype_capability_write(eImbFileType ftype)
ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, ImBufFlags flags)
bool IMB_alpha_affects_rgb(const ImBuf *ibuf)
bool IMB_ftype_is_supported(eImbFileType ftype)
eImbFileType IMB_test_image_type(const char *filepath)
ImBuf * IMB_load_image_from_memory(const unsigned char *mem, size_t size, ImBufFlags flags, const char *descr, const char *filepath=nullptr, ColorManagedColorspaceSettings *colorspace_settings=nullptr)
void IMB_update_gpu_texture_sub(gpu::Texture *tex, ImBuf *ibuf, int x, int y, int z, int w, int h, bool use_grayscale, bool use_premult)
eImbFileType IMB_test_image_type_from_memory(const unsigned char *buf, size_t buf_size)
void IMB_ImBufFromStereo3d(const Stereo3dFormat *s3d, ImBuf *ibuf_stereo3d, ImBuf **r_ibuf_left, ImBuf **r_ibuf_right)
void IMB_byte_from_float(ImBuf *ibuf)
gpu::Texture * IMB_acquire_gpu_texture(const char *name, ImBuf *ibuf, GPUTextureCreateFlags texture_create_flags, bool try_only=false)
gpu::Texture * IMB_create_gpu_texture(const char *name, ImBuf *ibuf, GPUTextureCreateFlags flags)
void IMB_rectblend_threaded(ImBuf *dbuf, const ImBuf *obuf, const ImBuf *sbuf, unsigned short *dmask, const unsigned short *curvemask, const unsigned short *texmask, float mask_max, int destx, int desty, int origx, int origy, int srcx, int srcy, int width, int height, IMB_BlendMode mode, bool accumulate)
ImBuf * IMB_allocFromBuffer(const uint8_t *byte_buffer, const float *float_buffer, unsigned int w, unsigned int h, unsigned int channels)
bool IMB_test_image(const char *filepath)
void IMB_free_gpu_textures(ImBuf *ibuf)
void IMB_free_all_data(ImBuf *ibuf)
void IMB_filter_extend(ImBuf *ibuf, char *mask, int filter)
void IMB_blend_color_byte(unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4], IMB_BlendMode mode)
ImBuf * IMB_thumb_load_image(const char *filepath, size_t max_thumb_size, ColorManagedColorspaceSettings *colorspace_settings, IMBThumbLoadFlags load_flags=IMBThumbLoadFlags::Zero)
void IMB_alpha_under_color_float(float *rect_float, int x, int y, float backcol[3])
bool IMB_alloc_float_pixels(ImBuf *ibuf, unsigned int channels, bool initialize_pixels=true)
void IMB_deactivate_gpu_context()
ImBuf * IMB_scale_into_new(const ImBuf *ibuf, int2 new_size, IMBScaleFilter filter, bool threaded=true)
bool IMB_scale(ImBuf *ibuf, int2 new_size, IMBScaleFilter filter, bool threaded=true)
void IMB_filtery(ImBuf *ibuf)
void IMB_free_float_pixels(ImBuf *ibuf)
gpu::Texture * IMB_touch_gpu_texture(const char *name, ImBuf *ibuf, int w, int h, int layers, bool use_high_bitdepth, bool use_grayscale)
eIMBTransformMode
Transform modes to use for IMB_transform function.
@ IMB_TRANSFORM_MODE_REGULAR
Do not crop or repeat.
@ IMB_TRANSFORM_MODE_WRAP_REPEAT
Wrap repeat the source buffer. Only supported in with nearest filtering.
@ IMB_TRANSFORM_MODE_CROP_SRC
Crop the source buffer.
void IMB_copy_rect(float *dst, const int2 &dst_size, const float *src, const int2 &src_size, int channels, const int2 &src_rect_pos, const int2 &dst_rect_pos, const int2 &rect_size)
void IMB_premultiply_alpha(ImBuf *ibuf)
ImBuf * IMB_load_image_from_file_descriptor(int file, ImBufFlags flags, const char *filepath=nullptr, ColorManagedColorspaceSettings *colorspace_settings=nullptr)
ccl_device_inline int rect_size(const int4 rect)