Blender V4.5
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
27namespace blender::ocio {
28class Display;
29} // namespace blender::ocio
31
35void IMB_init();
36void IMB_exit();
37
41ImBuf *IMB_load_image_from_memory(const unsigned char *mem,
42 const size_t size,
43 const int flags,
44 const char *descr,
45 const char *filepath = nullptr,
46 char r_colorspace[IM_MAX_SPACE] = nullptr);
47
49 const int flags,
50 const char *filepath = nullptr,
51 char r_colorspace[IM_MAX_SPACE] = nullptr);
52
53ImBuf *IMB_load_image_from_filepath(const char *filepath,
54 const int flags,
55 char r_colorspace[IM_MAX_SPACE] = nullptr);
56
60bool IMB_save_image(ImBuf *ibuf, const char *filepath, const int flags);
61
62/*
63 * Test image file.
64 */
65bool IMB_test_image(const char *filepath);
66bool IMB_test_image_type_matches(const char *filepath, int filetype);
67int IMB_test_image_type_from_memory(const unsigned char *buf, size_t buf_size);
68int IMB_test_image_type(const char *filepath);
69
70/*
71 * Load thumbnail image.
72 */
74 Zero = 0,
77 LoadLargeFiles = (1 << 0),
78};
80
81ImBuf *IMB_thumb_load_image(const char *filepath,
82 const size_t max_thumb_size,
83 char colorspace[IM_MAX_SPACE],
85
86/*
87 * Allocate and free image buffer.
88 */
89ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags);
90void IMB_freeImBuf(ImBuf *ibuf);
91
97bool IMB_initImBuf(
98 ImBuf *ibuf, unsigned int x, unsigned int y, unsigned char planes, unsigned int flags);
99
104ImBuf *IMB_allocFromBufferOwn(uint8_t *byte_buffer,
105 float *float_buffer,
106 unsigned int w,
107 unsigned int h,
108 unsigned int channels);
109
113ImBuf *IMB_allocFromBuffer(const uint8_t *byte_buffer,
114 const float *float_buffer,
115 unsigned int w,
116 unsigned int h,
117 unsigned int channels);
118
126void IMB_assign_byte_buffer(ImBuf *ibuf, uint8_t *buffer_data, ImBufOwnership ownership);
127void IMB_assign_float_buffer(ImBuf *ibuf, float *buffer_data, ImBufOwnership ownership);
128
138void IMB_assign_byte_buffer(ImBuf *ibuf, const ImBufByteBuffer &buffer, ImBufOwnership ownership);
140 const ImBufFloatBuffer &buffer,
141 ImBufOwnership ownership);
142void IMB_assign_dds_data(ImBuf *ibuf, const DDSData &data, ImBufOwnership ownership);
143
150
156uint8_t *IMB_steal_byte_buffer(ImBuf *ibuf);
157float *IMB_steal_float_buffer(ImBuf *ibuf);
158uint8_t *IMB_steal_encoded_buffer(ImBuf *ibuf);
159
165
166void IMB_refImBuf(ImBuf *ibuf);
168
169ImBuf *IMB_dupImBuf(const ImBuf *ibuf1);
170
174size_t IMB_get_size_in_memory(const ImBuf *ibuf);
175
183size_t IMB_get_pixel_count(const ImBuf *ibuf);
184
216
217void IMB_blend_color_byte(unsigned char dst[4],
218 const unsigned char src1[4],
219 const unsigned char src2[4],
220 IMB_BlendMode mode);
221void IMB_blend_color_float(float dst[4],
222 const float src1[4],
223 const float src2[4],
224 IMB_BlendMode mode);
225
229void IMB_rect_crop(ImBuf *ibuf, const rcti *crop);
230
234void IMB_rect_size_set(ImBuf *ibuf, const uint size[2]);
235
236void IMB_rectclip(ImBuf *dbuf,
237 const ImBuf *sbuf,
238 int *destx,
239 int *desty,
240 int *srcx,
241 int *srcy,
242 int *width,
243 int *height);
244void IMB_rectcpy(ImBuf *dbuf,
245 const ImBuf *sbuf,
246 int destx,
247 int desty,
248 int srcx,
249 int srcy,
250 int width,
251 int height);
252void IMB_rectblend(ImBuf *dbuf,
253 const ImBuf *obuf,
254 const ImBuf *sbuf,
255 unsigned short *dmask,
256 const unsigned short *curvemask,
257 const unsigned short *texmask,
258 float mask_max,
259 int destx,
260 int desty,
261 int origx,
262 int origy,
263 int srcx,
264 int srcy,
265 int width,
266 int height,
267 IMB_BlendMode mode,
268 bool accumulate);
270 const ImBuf *obuf,
271 const ImBuf *sbuf,
272 unsigned short *dmask,
273 const unsigned short *curvemask,
274 const unsigned short *texmask,
275 float mask_max,
276 int destx,
277 int desty,
278 int origx,
279 int origy,
280 int srcx,
281 int srcy,
282 int width,
283 int height,
284 IMB_BlendMode mode,
285 bool accumulate);
286
294
295#define FILTER_MASK_NULL 0
296#define FILTER_MASK_MARGIN 1
297#define FILTER_MASK_USED 2
298
299void IMB_mask_filter_extend(char *mask, int width, int height);
300void IMB_mask_clear(ImBuf *ibuf, const char *mask, int val);
307void IMB_filter_extend(ImBuf *ibuf, char *mask, int filter);
311void IMB_makemipmap(ImBuf *ibuf, int use_filter);
315void IMB_remakemipmap(ImBuf *ibuf, int use_filter);
316ImBuf *IMB_getmipmap(ImBuf *ibuf, int level);
317
318void IMB_filtery(ImBuf *ibuf);
319
320ImBuf *IMB_onehalf(ImBuf *ibuf1);
321
336
341bool IMB_scale(ImBuf *ibuf,
342 unsigned int newx,
343 unsigned int newy,
345 bool threaded = true);
346
351ImBuf *IMB_scale_into_new(const ImBuf *ibuf,
352 unsigned int newx,
353 unsigned int newy,
355 bool threaded = true);
356
360bool IMB_alpha_affects_rgb(const ImBuf *ibuf);
361
365void IMB_byte_from_float(ImBuf *ibuf);
366void IMB_float_from_byte_ex(ImBuf *dst, const ImBuf *src, const rcti *region_to_update);
367void IMB_float_from_byte(ImBuf *ibuf);
371void IMB_color_to_bw(ImBuf *ibuf);
372void IMB_saturation(ImBuf *ibuf, float sat);
373
374/* Converting pixel buffers. */
375
379void IMB_buffer_byte_from_float(unsigned char *rect_to,
380 const float *rect_from,
381 int channels_from,
382 float dither,
383 int profile_to,
384 int profile_from,
385 bool predivide,
386 int width,
387 int height,
388 int stride_to,
389 int stride_from,
390 int start_y = 0);
394void IMB_buffer_byte_from_float_mask(unsigned char *rect_to,
395 const float *rect_from,
396 int channels_from,
397 float dither,
398 bool predivide,
399 int width,
400 int height,
401 int stride_to,
402 int stride_from,
403 char *mask);
407void IMB_buffer_float_from_byte(float *rect_to,
408 const unsigned char *rect_from,
409 int profile_to,
410 int profile_from,
411 bool predivide,
412 int width,
413 int height,
414 int stride_to,
415 int stride_from);
419void IMB_buffer_float_from_float(float *rect_to,
420 const float *rect_from,
421 int channels_from,
422 int profile_to,
423 int profile_from,
424 bool predivide,
425 int width,
426 int height,
427 int stride_to,
428 int stride_from);
429void IMB_buffer_float_from_float_threaded(float *rect_to,
430 const float *rect_from,
431 int channels_from,
432 int profile_to,
433 int profile_from,
434 bool predivide,
435 int width,
436 int height,
437 int stride_to,
438 int stride_from);
442void IMB_buffer_float_from_float_mask(float *rect_to,
443 const float *rect_from,
444 int channels_from,
445 int width,
446 int height,
447 int stride_to,
448 int stride_from,
449 char *mask);
453void IMB_buffer_byte_from_byte(unsigned char *rect_to,
454 const unsigned char *rect_from,
455 int profile_to,
456 int profile_from,
457 bool predivide,
458 int width,
459 int height,
460 int stride_to,
461 int stride_from);
462
463void IMB_alpha_under_color_float(float *rect_float, int x, int y, float backcol[3]);
464void IMB_alpha_under_color_byte(unsigned char *rect, int x, int y, const float backcol[3]);
465
466ImBuf *IMB_half_x(ImBuf *ibuf1);
467ImBuf *IMB_half_y(ImBuf *ibuf1);
468
469void IMB_flipx(ImBuf *ibuf);
470void IMB_flipy(ImBuf *ibuf);
471
472/* Rotate by 90 degree increments. Returns true if the ImBuf is altered. */
473bool IMB_rotate_orthogonal(ImBuf *ibuf, int degrees);
474
475/* Pre-multiply alpha. */
476
477void IMB_premultiply_alpha(ImBuf *ibuf);
479
485void IMB_rectfill(ImBuf *drect, const float col[4]);
501void IMB_rectfill_area(ImBuf *ibuf,
502 const float col[4],
503 int x1,
504 int y1,
505 int x2,
506 int y2,
507 const ColorManagedDisplay *display);
518 const ImBuf *ibuf, const float col[4], int x1, int y1, int x2, int y2);
519void IMB_rectfill_alpha(ImBuf *ibuf, float value);
520
525void buf_rectfill_area(unsigned char *rect,
526 float *rectf,
527 int width,
528 int height,
529 const float col[4],
530 const ColorManagedDisplay *display,
531 int x1,
532 int y1,
533 int x2,
534 int y2);
535
539void *imb_alloc_pixels(unsigned int x,
540 unsigned int y,
541 unsigned int channels,
542 size_t typesize,
543 bool initialize_pixels,
544 const char *alloc_name);
545
550bool IMB_alloc_byte_pixels(ImBuf *ibuf, bool initialize_pixels = true);
551
555void IMB_free_byte_pixels(ImBuf *ibuf);
556
562 const unsigned int channels,
563 bool initialize_pixels = true);
567void IMB_free_float_pixels(ImBuf *ibuf);
568
572void IMB_free_mipmaps(ImBuf *ibuf);
573
575void IMB_free_all_data(ImBuf *ibuf);
576
577/* Free the GPU textures of the given image buffer, leaving the CPU buffers unchanged.
578 * The ibuf can be nullptr, in which case the function does nothing. */
579void IMB_free_gpu_textures(ImBuf *ibuf);
580
594
614void IMB_transform(const ImBuf *src,
615 ImBuf *dst,
618 const blender::float3x3 &transform_matrix,
619 const rctf *src_crop);
620
621GPUTexture *IMB_create_gpu_texture(const char *name,
622 ImBuf *ibuf,
623 bool use_high_bitdepth,
624 bool use_premult);
625
627 bool high_bitdepth,
628 bool use_grayscale);
629
635void IMB_gpu_clamp_half_float(ImBuf *image_buffer);
636
641GPUTexture *IMB_touch_gpu_texture(const char *name,
642 ImBuf *ibuf,
643 int w,
644 int h,
645 int layers,
646 bool use_high_bitdepth,
647 bool use_grayscale);
648
654void IMB_update_gpu_texture_sub(GPUTexture *tex,
655 ImBuf *ibuf,
656 int x,
657 int y,
658 int z,
659 int w,
660 int h,
661 bool use_high_bitdepth,
662 bool use_grayscale,
663 bool use_premult);
664
666 char mode, bool is_squeezed, size_t width, size_t height, size_t *r_width, size_t *r_height);
668 char mode, bool is_squeezed, size_t width, size_t height, size_t *r_width, size_t *r_height);
672ImBuf *IMB_stereo3d_ImBuf(const ImageFormatData *im_format, ImBuf *ibuf_left, ImBuf *ibuf_right);
677 ImBuf *ibuf_stereo3d,
678 ImBuf **r_ibuf_left,
679 ImBuf **r_ibuf_right);
blender::ocio::Display ColorManagedDisplay
Definition BLF_api.hh:35
struct GSet GSet
Definition BLI_ghash.h:337
unsigned int uint
#define ENUM_OPERATORS(_type, _max)
eGPUTextureFormat
void IMB_flipy(ImBuf *ibuf)
void IMB_exit()
Definition module.cc:23
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:577
void IMB_free_gpu_textures(ImBuf *ibuf)
ImBuf * IMB_onehalf(ImBuf *ibuf1)
Definition scaling.cc:313
ImBuf * IMB_load_image_from_filepath(const char *filepath, const int flags, char r_colorspace[IM_MAX_SPACE]=nullptr)
Definition readimage.cc:204
void IMB_rectfill_alpha(ImBuf *ibuf, float value)
Definition rectop.cc:1195
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)
void IMB_make_writable_byte_buffer(ImBuf *ibuf)
void IMB_mask_filter_extend(char *mask, int width, int height)
Definition filter.cc:217
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:116
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:939
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:323
GPUTexture * 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:255
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:229
ImBuf * IMB_half_x(ImBuf *ibuf1)
Definition scaling.cc:87
ImBuf * IMB_makeSingleUser(ImBuf *ibuf)
void IMB_assign_float_buffer(ImBuf *ibuf, float *buffer_data, ImBufOwnership ownership)
ImBuf * IMB_half_y(ImBuf *ibuf1)
Definition scaling.cc:179
void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height, const float col[4], const ColorManagedDisplay *display, int x1, int y1, int x2, int y2)
Definition rectop.cc:1058
void IMB_rectfill_area_replace(const ImBuf *ibuf, const float col[4], int x1, int y1, int x2, int y2)
Definition rectop.cc:1011
void IMB_makemipmap(ImBuf *ibuf, int use_filter)
Definition filter.cc:488
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:70
eIMBTransformMode
Transform modes to use for IMB_transform function.
Definition IMB_imbuf.hh:586
@ IMB_TRANSFORM_MODE_WRAP_REPEAT
Wrap repeat the source buffer. Only supported in with nearest filtering.
Definition IMB_imbuf.hh:592
@ IMB_TRANSFORM_MODE_REGULAR
Do not crop or repeat.
Definition IMB_imbuf.hh:588
@ IMB_TRANSFORM_MODE_CROP_SRC
Crop the source buffer.
Definition IMB_imbuf.hh:590
void IMB_remakemipmap(ImBuf *ibuf, int use_filter)
Definition filter.cc:452
bool IMB_alpha_affects_rgb(const ImBuf *ibuf)
Definition conversion.cc:65
void IMB_unpremultiply_alpha(ImBuf *ibuf)
Definition filter.cc:639
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:29
void IMB_mask_clear(ImBuf *ibuf, const char *mask, int val)
Definition filter.cc:261
eGPUTextureFormat IMB_gpu_get_texture_format(const ImBuf *ibuf, bool high_bitdepth, bool use_grayscale)
Definition util_gpu.cc:395
void IMB_color_to_bw(ImBuf *ibuf)
void IMB_rect_crop(ImBuf *ibuf, const rcti *crop)
Definition rectop.cc:242
void IMB_update_gpu_texture_sub(GPUTexture *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:281
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:308
void IMB_init()
Definition module.cc:16
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:185
@ IMB_BLEND_EXCLUSION
Definition IMB_imbuf.hh:205
@ IMB_BLEND_DIFFERENCE
Definition IMB_imbuf.hh:204
@ IMB_BLEND_HARDLIGHT
Definition IMB_imbuf.hh:195
@ IMB_BLEND_COLORBURN
Definition IMB_imbuf.hh:196
@ IMB_BLEND_COLORDODGE
Definition IMB_imbuf.hh:198
@ IMB_BLEND_ERASE_ALPHA
Definition IMB_imbuf.hh:192
@ IMB_BLEND_SCREEN
Definition IMB_imbuf.hh:199
@ IMB_BLEND_HUE
Definition IMB_imbuf.hh:206
@ IMB_BLEND_MUL
Definition IMB_imbuf.hh:189
@ IMB_BLEND_ADD_ALPHA
Definition IMB_imbuf.hh:193
@ IMB_BLEND_DARKEN
Definition IMB_imbuf.hh:191
@ IMB_BLEND_OVERLAY
Definition IMB_imbuf.hh:194
@ IMB_BLEND_SATURATION
Definition IMB_imbuf.hh:207
@ IMB_BLEND_VIVIDLIGHT
Definition IMB_imbuf.hh:202
@ IMB_BLEND_LUMINOSITY
Definition IMB_imbuf.hh:208
@ IMB_BLEND_LIGHTEN
Definition IMB_imbuf.hh:190
@ IMB_BLEND_SOFTLIGHT
Definition IMB_imbuf.hh:200
@ IMB_BLEND_COPY_RGB
Definition IMB_imbuf.hh:213
@ IMB_BLEND_COLOR
Definition IMB_imbuf.hh:209
@ IMB_BLEND_LINEARLIGHT
Definition IMB_imbuf.hh:203
@ IMB_BLEND_COPY_ALPHA
Definition IMB_imbuf.hh:214
@ IMB_BLEND_PINLIGHT
Definition IMB_imbuf.hh:201
@ IMB_BLEND_MIX
Definition IMB_imbuf.hh:186
@ IMB_BLEND_COPY
Definition IMB_imbuf.hh:212
@ IMB_BLEND_INTERPOLATE
Definition IMB_imbuf.hh:210
@ IMB_BLEND_ADD
Definition IMB_imbuf.hh:187
@ IMB_BLEND_SUB
Definition IMB_imbuf.hh:188
@ IMB_BLEND_LINEARBURN
Definition IMB_imbuf.hh:197
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:476
void IMB_free_byte_pixels(ImBuf *ibuf)
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:801
void IMB_blend_color_float(float dst[4], const float src1[4], const float src2[4], IMB_BlendMode mode)
Definition rectop.cc:117
void IMB_rectfill(ImBuf *drect, const float col[4])
Definition rectop.cc:979
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:150
void IMB_rect_size_set(ImBuf *ibuf, const uint size[2])
Definition rectop.cc:289
IMBThumbLoadFlags
Definition IMB_imbuf.hh:73
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])
void IMB_free_mipmaps(ImBuf *ibuf)
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)
void IMB_rectcpy(ImBuf *dbuf, const ImBuf *sbuf, int destx, int desty, int srcx, int srcy, int width, int height)
Definition rectop.cc:445
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:317
bool IMB_save_image(ImBuf *ibuf, const char *filepath, const int flags)
Definition writeimage.cc:20
GPUTexture * IMB_create_gpu_texture(const char *name, ImBuf *ibuf, bool use_high_bitdepth, bool use_premult)
Definition util_gpu.cc:312
ImBuf * IMB_getmipmap(ImBuf *ibuf, int level)
Definition filter.cc:525
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:777
void IMB_rectfill_area(ImBuf *ibuf, const float col[4], int x1, int y1, int x2, int y2, const ColorManagedDisplay *display)
Definition rectop.cc:1172
void IMB_float_from_byte(ImBuf *ibuf)
eIMBInterpolationFilterMode
Definition IMB_imbuf.hh:287
@ IMB_FILTER_NEAREST
Definition IMB_imbuf.hh:288
@ IMB_FILTER_CUBIC_BSPLINE
Definition IMB_imbuf.hh:290
@ IMB_FILTER_CUBIC_MITCHELL
Definition IMB_imbuf.hh:291
@ IMB_FILTER_BILINEAR
Definition IMB_imbuf.hh:289
@ IMB_FILTER_BOX
Definition IMB_imbuf.hh:292
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:404
#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