Blender V5.0
IMB_imbuf.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 * SPDX-FileCopyrightText: 2025 Blender Authors
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later */
5
9
10#pragma once
11
12#include "../gpu/GPU_texture.hh"
13
15#include "BLI_utildefines.h"
16
17#include "IMB_imbuf_types.hh"
18
19struct ImBuf;
20struct rctf;
21struct rcti;
22
23struct GSet;
24struct ImageFormatData;
25struct Stereo3dFormat;
26
30void IMB_init();
31void IMB_exit();
32
36ImBuf *IMB_load_image_from_memory(const unsigned char *mem,
37 const size_t size,
38 const int flags,
39 const char *descr,
40 const char *filepath = nullptr,
41 char r_colorspace[IM_MAX_SPACE] = nullptr);
42
44 const int flags,
45 const char *filepath = nullptr,
46 char r_colorspace[IM_MAX_SPACE] = nullptr);
47
48ImBuf *IMB_load_image_from_filepath(const char *filepath,
49 const int flags,
50 char r_colorspace[IM_MAX_SPACE] = nullptr);
51
55bool IMB_save_image(ImBuf *ibuf, const char *filepath, const int flags);
56
57/*
58 * Test image file.
59 */
60bool IMB_test_image(const char *filepath);
61bool IMB_test_image_type_matches(const char *filepath, int filetype);
62int IMB_test_image_type_from_memory(const unsigned char *buf, size_t buf_size);
63int IMB_test_image_type(const char *filepath);
64
65/*
66 * Load thumbnail image.
67 */
69 Zero = 0,
72 LoadLargeFiles = (1 << 0),
73};
75
76ImBuf *IMB_thumb_load_image(const char *filepath,
77 const size_t max_thumb_size,
78 char colorspace[IM_MAX_SPACE],
80
81/*
82 * Allocate and free image buffer.
83 */
84ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags);
85void IMB_freeImBuf(ImBuf *ibuf);
86
92bool IMB_initImBuf(
93 ImBuf *ibuf, unsigned int x, unsigned int y, unsigned char planes, unsigned int flags);
94
99ImBuf *IMB_allocFromBufferOwn(uint8_t *byte_buffer,
100 float *float_buffer,
101 unsigned int w,
102 unsigned int h,
103 unsigned int channels);
104
108ImBuf *IMB_allocFromBuffer(const uint8_t *byte_buffer,
109 const float *float_buffer,
110 unsigned int w,
111 unsigned int h,
112 unsigned int channels);
113
120void IMB_assign_byte_buffer(ImBuf *ibuf, uint8_t *buffer_data, ImBufOwnership ownership);
121void IMB_assign_float_buffer(ImBuf *ibuf, float *buffer_data, ImBufOwnership ownership);
122
131void IMB_assign_byte_buffer(ImBuf *ibuf, const ImBufByteBuffer &buffer, ImBufOwnership ownership);
133 const ImBufFloatBuffer &buffer,
134 ImBufOwnership ownership);
135void IMB_assign_dds_data(ImBuf *ibuf, const DDSData &data, ImBufOwnership ownership);
136
143
149uint8_t *IMB_steal_byte_buffer(ImBuf *ibuf);
150float *IMB_steal_float_buffer(ImBuf *ibuf);
151uint8_t *IMB_steal_encoded_buffer(ImBuf *ibuf);
152
158
159void IMB_refImBuf(ImBuf *ibuf);
161
162ImBuf *IMB_dupImBuf(const ImBuf *ibuf1);
163
167size_t IMB_get_size_in_memory(const ImBuf *ibuf);
168
176size_t IMB_get_pixel_count(const ImBuf *ibuf);
177
209
210void IMB_blend_color_byte(unsigned char dst[4],
211 const unsigned char src1[4],
212 const unsigned char src2[4],
213 IMB_BlendMode mode);
214void IMB_blend_color_float(float dst[4],
215 const float src1[4],
216 const float src2[4],
217 IMB_BlendMode mode);
218
222void IMB_rect_crop(ImBuf *ibuf, const rcti *crop);
223
227void IMB_rect_size_set(ImBuf *ibuf, const uint size[2]);
228
229void IMB_rectclip(ImBuf *dbuf,
230 const ImBuf *sbuf,
231 int *destx,
232 int *desty,
233 int *srcx,
234 int *srcy,
235 int *width,
236 int *height);
237void IMB_rectcpy(ImBuf *dbuf,
238 const ImBuf *sbuf,
239 int destx,
240 int desty,
241 int srcx,
242 int srcy,
243 int width,
244 int height);
245void IMB_rectblend(ImBuf *dbuf,
246 const ImBuf *obuf,
247 const ImBuf *sbuf,
248 unsigned short *dmask,
249 const unsigned short *curvemask,
250 const unsigned short *texmask,
251 float mask_max,
252 int destx,
253 int desty,
254 int origx,
255 int origy,
256 int srcx,
257 int srcy,
258 int width,
259 int height,
260 IMB_BlendMode mode,
261 bool accumulate);
263 const ImBuf *obuf,
264 const ImBuf *sbuf,
265 unsigned short *dmask,
266 const unsigned short *curvemask,
267 const unsigned short *texmask,
268 float mask_max,
269 int destx,
270 int desty,
271 int origx,
272 int origy,
273 int srcx,
274 int srcy,
275 int width,
276 int height,
277 IMB_BlendMode mode,
278 bool accumulate);
279
287
288#define FILTER_MASK_NULL 0
289#define FILTER_MASK_MARGIN 1
290#define FILTER_MASK_USED 2
291
292void IMB_mask_filter_extend(char *mask, int width, int height);
293void IMB_mask_clear(ImBuf *ibuf, const char *mask, int val);
300void IMB_filter_extend(ImBuf *ibuf, char *mask, int filter);
301
302void IMB_filtery(ImBuf *ibuf);
303
318
323bool IMB_scale(ImBuf *ibuf,
324 unsigned int newx,
325 unsigned int newy,
327 bool threaded = true);
328
333ImBuf *IMB_scale_into_new(const ImBuf *ibuf,
334 unsigned int newx,
335 unsigned int newy,
337 bool threaded = true);
338
342bool IMB_alpha_affects_rgb(const ImBuf *ibuf);
343
347void IMB_byte_from_float(ImBuf *ibuf);
348void IMB_float_from_byte_ex(ImBuf *dst, const ImBuf *src, const rcti *region_to_update);
349void IMB_float_from_byte(ImBuf *ibuf);
353void IMB_color_to_bw(ImBuf *ibuf);
354void IMB_saturation(ImBuf *ibuf, float sat);
355
356/* Converting pixel buffers. */
357
361void IMB_buffer_byte_from_float(unsigned char *rect_to,
362 const float *rect_from,
363 int channels_from,
364 float dither,
365 int profile_to,
366 int profile_from,
367 bool predivide,
368 int width,
369 int height,
370 int stride_to,
371 int stride_from,
372 int start_y = 0);
376void IMB_buffer_byte_from_float_mask(unsigned char *rect_to,
377 const float *rect_from,
378 int channels_from,
379 float dither,
380 bool predivide,
381 int width,
382 int height,
383 int stride_to,
384 int stride_from,
385 char *mask);
389void IMB_buffer_float_from_byte(float *rect_to,
390 const unsigned char *rect_from,
391 int profile_to,
392 int profile_from,
393 bool predivide,
394 int width,
395 int height,
396 int stride_to,
397 int stride_from);
401void IMB_buffer_float_from_float(float *rect_to,
402 const float *rect_from,
403 int channels_from,
404 int profile_to,
405 int profile_from,
406 bool predivide,
407 int width,
408 int height,
409 int stride_to,
410 int stride_from);
411void IMB_buffer_float_from_float_threaded(float *rect_to,
412 const float *rect_from,
413 int channels_from,
414 int profile_to,
415 int profile_from,
416 bool predivide,
417 int width,
418 int height,
419 int stride_to,
420 int stride_from);
424void IMB_buffer_float_from_float_mask(float *rect_to,
425 const float *rect_from,
426 int channels_from,
427 int width,
428 int height,
429 int stride_to,
430 int stride_from,
431 char *mask);
435void IMB_buffer_byte_from_byte(unsigned char *rect_to,
436 const unsigned char *rect_from,
437 int profile_to,
438 int profile_from,
439 bool predivide,
440 int width,
441 int height,
442 int stride_to,
443 int stride_from);
444
445void IMB_alpha_under_color_float(float *rect_float, int x, int y, float backcol[3]);
446void IMB_alpha_under_color_byte(unsigned char *rect, int x, int y, const float backcol[3]);
447
448void IMB_flipx(ImBuf *ibuf);
449void IMB_flipy(ImBuf *ibuf);
450
451/* Rotate by 90 degree increments. Returns true if the ImBuf is altered. */
452bool IMB_rotate_orthogonal(ImBuf *ibuf, int degrees);
453
454/* Pre-multiply alpha. */
455
456void IMB_premultiply_alpha(ImBuf *ibuf);
458
464void IMB_rectfill(ImBuf *drect, const float col[4]);
478 ImBuf *ibuf, const float scene_linear_color[4], int x1, int y1, int x2, int y2);
479void IMB_rectfill_alpha(ImBuf *ibuf, float value);
480
484void *imb_alloc_pixels(unsigned int x,
485 unsigned int y,
486 unsigned int channels,
487 size_t typesize,
488 bool initialize_pixels,
489 const char *alloc_name);
490
495bool IMB_alloc_byte_pixels(ImBuf *ibuf, bool initialize_pixels = true);
496
500void IMB_free_byte_pixels(ImBuf *ibuf);
501
507 const unsigned int channels,
508 bool initialize_pixels = true);
512void IMB_free_float_pixels(ImBuf *ibuf);
513
515void IMB_free_all_data(ImBuf *ibuf);
516
517/* Free the GPU textures of the given image buffer, leaving the CPU buffers unchanged.
518 * The ibuf can be nullptr, in which case the function does nothing. */
519void IMB_free_gpu_textures(ImBuf *ibuf);
520
534
554void IMB_transform(const ImBuf *src,
555 ImBuf *dst,
558 const blender::float3x3 &transform_matrix,
559 const rctf *src_crop);
560
562 ImBuf *ibuf,
563 bool use_high_bitdepth,
564 bool use_premult);
565
567 bool high_bitdepth,
568 bool use_grayscale);
569
570bool IMB_gpu_get_compressed_format(const ImBuf *ibuf,
571 blender::gpu::TextureFormat *r_texture_format);
572
578void IMB_gpu_clamp_half_float(ImBuf *image_buffer);
579
585 ImBuf *ibuf,
586 int w,
587 int h,
588 int layers,
589 bool use_high_bitdepth,
590 bool use_grayscale);
591
597 ImBuf *ibuf,
598 int x,
599 int y,
600 int z,
601 int w,
602 int h,
603 bool use_high_bitdepth,
604 bool use_grayscale,
605 bool use_premult);
606
608 char mode, bool is_squeezed, size_t width, size_t height, size_t *r_width, size_t *r_height);
610 char mode, bool is_squeezed, size_t width, size_t height, size_t *r_width, size_t *r_height);
614ImBuf *IMB_stereo3d_ImBuf(const ImageFormatData *im_format, ImBuf *ibuf_left, ImBuf *ibuf_right);
619 ImBuf *ibuf_stereo3d,
620 ImBuf **r_ibuf_left,
621 ImBuf **r_ibuf_right);
struct GSet GSet
Definition BLI_ghash.h:337
unsigned int uint
#define ENUM_OPERATORS(_type, _max)
void IMB_flipy(ImBuf *ibuf)
void IMB_exit()
Definition module.cc:21
void IMB_buffer_float_from_float_mask(float *rect_to, const float *rect_from, int channels_from, int width, int height, int stride_to, int stride_from, char *mask)
void IMB_premultiply_alpha(ImBuf *ibuf)
Definition filter.cc:381
void IMB_free_gpu_textures(ImBuf *ibuf)
ImBuf * IMB_load_image_from_filepath(const char *filepath, const int flags, char r_colorspace[IM_MAX_SPACE]=nullptr)
Definition readimage.cc:189
void IMB_rectfill_alpha(ImBuf *ibuf, float value)
Definition rectop.cc:1122
float * IMB_steal_float_buffer(ImBuf *ibuf)
void IMB_float_from_byte_ex(ImBuf *dst, const ImBuf *src, const rcti *region_to_update)
void IMB_flipx(ImBuf *ibuf)
ImBuf * IMB_dupImBuf(const ImBuf *ibuf1)
blender::gpu::Texture * IMB_create_gpu_texture(const char *name, ImBuf *ibuf, bool use_high_bitdepth, bool use_premult)
Definition util_gpu.cc:327
void IMB_make_writable_byte_buffer(ImBuf *ibuf)
void IMB_mask_filter_extend(char *mask, int width, int height)
Definition filter.cc:100
ImBuf * IMB_load_image_from_memory(const unsigned char *mem, const size_t size, const int flags, const char *descr, const char *filepath=nullptr, char r_colorspace[IM_MAX_SPACE]=nullptr)
Definition readimage.cc:121
uint8_t * IMB_steal_byte_buffer(ImBuf *ibuf)
void IMB_assign_dds_data(ImBuf *ibuf, const DDSData &data, ImBufOwnership ownership)
int IMB_test_image_type(const char *filepath)
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)
Definition rectop.cc:938
void IMB_transform(const ImBuf *src, ImBuf *dst, eIMBTransformMode mode, eIMBInterpolationFilterMode filter, const blender::float3x3 &transform_matrix, const rctf *src_crop)
Transform source image buffer onto destination image buffer using a transform matrix.
ImBuf * IMB_allocFromBuffer(const uint8_t *byte_buffer, const float *float_buffer, unsigned int w, unsigned int h, unsigned int channels)
IMBScaleFilter
Definition IMB_imbuf.hh:305
ImBuf * IMB_thumb_load_image(const char *filepath, const size_t max_thumb_size, char colorspace[IM_MAX_SPACE], const IMBThumbLoadFlags load_flags=IMBThumbLoadFlags::Zero)
Definition readimage.cc:214
ImBuf * IMB_makeSingleUser(ImBuf *ibuf)
void IMB_assign_float_buffer(ImBuf *ibuf, float *buffer_data, ImBufOwnership ownership)
void IMB_ImBufFromStereo3d(const Stereo3dFormat *s3d, ImBuf *ibuf_stereo3d, ImBuf **r_ibuf_left, ImBuf **r_ibuf_right)
void IMB_buffer_byte_from_float(unsigned char *rect_to, const float *rect_from, int channels_from, float dither, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from, int start_y=0)
Definition conversion.cc:71
eIMBTransformMode
Transform modes to use for IMB_transform function.
Definition IMB_imbuf.hh:526
@ IMB_TRANSFORM_MODE_WRAP_REPEAT
Wrap repeat the source buffer. Only supported in with nearest filtering.
Definition IMB_imbuf.hh:532
@ IMB_TRANSFORM_MODE_REGULAR
Do not crop or repeat.
Definition IMB_imbuf.hh:528
@ IMB_TRANSFORM_MODE_CROP_SRC
Crop the source buffer.
Definition IMB_imbuf.hh:530
bool IMB_alpha_affects_rgb(const ImBuf *ibuf)
Definition conversion.cc:66
void IMB_unpremultiply_alpha(ImBuf *ibuf)
Definition filter.cc:443
ImBuf * IMB_allocFromBufferOwn(uint8_t *byte_buffer, float *float_buffer, unsigned int w, unsigned int h, unsigned int channels)
bool IMB_alloc_byte_pixels(ImBuf *ibuf, bool initialize_pixels=true)
void IMB_buffer_byte_from_byte(unsigned char *rect_to, const unsigned char *rect_from, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from)
void IMB_buffer_float_from_byte(float *rect_to, const unsigned char *rect_from, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from)
void IMB_byte_from_float(ImBuf *ibuf)
void IMB_buffer_float_from_float(float *rect_to, const float *rect_from, int channels_from, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from)
void IMB_buffer_byte_from_float_mask(unsigned char *rect_to, const float *rect_from, int channels_from, float dither, bool predivide, int width, int height, int stride_to, int stride_from, char *mask)
void IMB_free_all_data(ImBuf *ibuf)
void IMB_make_writable_float_buffer(ImBuf *ibuf)
void IMB_blend_color_byte(unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4], IMB_BlendMode mode)
Definition rectop.cc:28
void IMB_mask_clear(ImBuf *ibuf, const char *mask, int val)
Definition filter.cc:144
void IMB_color_to_bw(ImBuf *ibuf)
void IMB_rect_crop(ImBuf *ibuf, const rcti *crop)
Definition rectop.cc:241
bool IMB_test_image_type_matches(const char *filepath, int filetype)
void IMB_rectclip(ImBuf *dbuf, const ImBuf *sbuf, int *destx, int *desty, int *srcx, int *srcy, int *width, int *height)
Definition rectop.cc:307
void IMB_init()
Definition module.cc:15
void IMB_buffer_float_from_float_threaded(float *rect_to, const float *rect_from, int channels_from, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from)
IMB_BlendMode
Definition IMB_imbuf.hh:178
@ IMB_BLEND_EXCLUSION
Definition IMB_imbuf.hh:198
@ IMB_BLEND_DIFFERENCE
Definition IMB_imbuf.hh:197
@ IMB_BLEND_HARDLIGHT
Definition IMB_imbuf.hh:188
@ IMB_BLEND_COLORBURN
Definition IMB_imbuf.hh:189
@ IMB_BLEND_COLORDODGE
Definition IMB_imbuf.hh:191
@ IMB_BLEND_ERASE_ALPHA
Definition IMB_imbuf.hh:185
@ IMB_BLEND_SCREEN
Definition IMB_imbuf.hh:192
@ IMB_BLEND_HUE
Definition IMB_imbuf.hh:199
@ IMB_BLEND_MUL
Definition IMB_imbuf.hh:182
@ IMB_BLEND_ADD_ALPHA
Definition IMB_imbuf.hh:186
@ IMB_BLEND_DARKEN
Definition IMB_imbuf.hh:184
@ IMB_BLEND_OVERLAY
Definition IMB_imbuf.hh:187
@ IMB_BLEND_SATURATION
Definition IMB_imbuf.hh:200
@ IMB_BLEND_VIVIDLIGHT
Definition IMB_imbuf.hh:195
@ IMB_BLEND_LUMINOSITY
Definition IMB_imbuf.hh:201
@ IMB_BLEND_LIGHTEN
Definition IMB_imbuf.hh:183
@ IMB_BLEND_SOFTLIGHT
Definition IMB_imbuf.hh:193
@ IMB_BLEND_COPY_RGB
Definition IMB_imbuf.hh:206
@ IMB_BLEND_COLOR
Definition IMB_imbuf.hh:202
@ IMB_BLEND_LINEARLIGHT
Definition IMB_imbuf.hh:196
@ IMB_BLEND_COPY_ALPHA
Definition IMB_imbuf.hh:207
@ IMB_BLEND_PINLIGHT
Definition IMB_imbuf.hh:194
@ IMB_BLEND_MIX
Definition IMB_imbuf.hh:179
@ IMB_BLEND_COPY
Definition IMB_imbuf.hh:205
@ IMB_BLEND_INTERPOLATE
Definition IMB_imbuf.hh:203
@ IMB_BLEND_ADD
Definition IMB_imbuf.hh:180
@ IMB_BLEND_SUB
Definition IMB_imbuf.hh:181
@ IMB_BLEND_LINEARBURN
Definition IMB_imbuf.hh:190
void IMB_freeImBuf(ImBuf *ibuf)
void IMB_saturation(ImBuf *ibuf, float sat)
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_alloc_pixels(unsigned int x, unsigned int y, unsigned int channels, size_t typesize, bool initialize_pixels, const char *alloc_name)
size_t IMB_get_pixel_count(const ImBuf *ibuf)
Get the length of the data of the given image buffer in pixels.
bool IMB_rotate_orthogonal(ImBuf *ibuf, int degrees)
ImBuf * IMB_stereo3d_ImBuf(const ImageFormatData *im_format, ImBuf *ibuf_left, ImBuf *ibuf_right)
ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
void IMB_free_float_pixels(ImBuf *ibuf)
void IMB_refImBuf(ImBuf *ibuf)
void IMB_rectblend(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)
Definition rectop.cc:475
void IMB_free_byte_pixels(ImBuf *ibuf)
void IMB_update_gpu_texture_sub(blender::gpu::Texture *tex, ImBuf *ibuf, int x, int y, int z, int w, int h, bool use_high_bitdepth, bool use_grayscale, bool use_premult)
Definition util_gpu.cc:296
uint8_t * IMB_steal_encoded_buffer(ImBuf *ibuf)
void IMB_filtery(ImBuf *ibuf)
Definition filter.cc:63
ImBuf * IMB_scale_into_new(const ImBuf *ibuf, unsigned int newx, unsigned int newy, IMBScaleFilter filter, bool threaded=true)
Definition scaling.cc:489
void IMB_blend_color_float(float dst[4], const float src1[4], const float src2[4], IMB_BlendMode mode)
Definition rectop.cc:116
blender::gpu::Texture * IMB_touch_gpu_texture(const char *name, ImBuf *ibuf, int w, int h, int layers, bool use_high_bitdepth, bool use_grayscale)
Definition util_gpu.cc:270
void IMB_rectfill(ImBuf *drect, const float col[4])
Definition rectop.cc:978
blender::gpu::TextureFormat IMB_gpu_get_texture_format(const ImBuf *ibuf, bool high_bitdepth, bool use_grayscale)
Definition util_gpu.cc:410
ImBuf * IMB_load_image_from_file_descriptor(const int file, const int flags, const char *filepath=nullptr, char r_colorspace[IM_MAX_SPACE]=nullptr)
Definition readimage.cc:155
void IMB_rectfill_area(ImBuf *ibuf, const float scene_linear_color[4], int x1, int y1, int x2, int y2)
Definition rectop.cc:1007
void IMB_rect_size_set(ImBuf *ibuf, const uint size[2])
Definition rectop.cc:288
IMBThumbLoadFlags
Definition IMB_imbuf.hh:68
bool IMB_alloc_float_pixels(ImBuf *ibuf, const unsigned int channels, bool initialize_pixels=true)
void IMB_alpha_under_color_float(float *rect_float, int x, int y, float backcol[3])
bool IMB_initImBuf(ImBuf *ibuf, unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
void IMB_assign_byte_buffer(ImBuf *ibuf, uint8_t *buffer_data, ImBufOwnership ownership)
bool IMB_gpu_get_compressed_format(const ImBuf *ibuf, blender::gpu::TextureFormat *r_texture_format)
Definition util_gpu.cc:101
void IMB_rectcpy(ImBuf *dbuf, const ImBuf *sbuf, int destx, int desty, int srcx, int srcy, int width, int height)
Definition rectop.cc:444
void IMB_alpha_under_color_byte(unsigned char *rect, int x, int y, const float backcol[3])
void IMB_filter_extend(ImBuf *ibuf, char *mask, int filter)
Definition filter.cc:200
bool IMB_save_image(ImBuf *ibuf, const char *filepath, const int flags)
Definition writeimage.cc:23
void IMB_stereo3d_write_dimensions(char mode, bool is_squeezed, size_t width, size_t height, size_t *r_width, size_t *r_height)
bool IMB_test_image(const char *filepath)
bool IMB_scale(ImBuf *ibuf, unsigned int newx, unsigned int newy, IMBScaleFilter filter, bool threaded=true)
Definition scaling.cc:465
void IMB_float_from_byte(ImBuf *ibuf)
eIMBInterpolationFilterMode
Definition IMB_imbuf.hh:280
@ IMB_FILTER_NEAREST
Definition IMB_imbuf.hh:281
@ IMB_FILTER_CUBIC_BSPLINE
Definition IMB_imbuf.hh:283
@ IMB_FILTER_CUBIC_MITCHELL
Definition IMB_imbuf.hh:284
@ IMB_FILTER_BILINEAR
Definition IMB_imbuf.hh:282
@ IMB_FILTER_BOX
Definition IMB_imbuf.hh:285
size_t IMB_get_size_in_memory(const ImBuf *ibuf)
int IMB_test_image_type_from_memory(const unsigned char *buf, size_t buf_size)
void IMB_gpu_clamp_half_float(ImBuf *image_buffer)
Definition util_gpu.cc:419
#define IM_MAX_SPACE
ImBufOwnership
BMesh const char void * data
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition btDbvt.cpp:52
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
Definition btQuadWord.h:117
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition btQuadWord.h:119
uint col
#define filter
constexpr T degrees(T) RET
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
MatBase< float, 3, 3 > float3x3
const char * name