|
Blender V5.0
|
#include "BLI_math_vector.hh"#include "BLI_task.hh"#include "BLI_utildefines.h"#include "MEM_guardedalloc.h"#include "IMB_filter.hh"#include "IMB_imbuf.hh"#include "IMB_imbuf_types.hh"#include "IMB_interp.hh"#include "IMB_metadata.hh"#include "BLI_sys_types.h"Go to the source code of this file.
Classes | |
| struct | ScaleDownX |
| struct | ScaleDownY |
| struct | ScaleUpX |
| struct | ScaleUpY |
Typedefs | |
| using | ScaleFunction |
| using | float2 |
| using | float3 |
| using | float4 |
| using | uchar4 |
Functions | |
| static void | alloc_scale_dst_buffers (const ImBuf *ibuf, uint newx, uint newy, uchar4 **r_dst_byte, float **r_dst_float) |
| static float4 | load_pixel (const uchar4 *ptr) |
| static float4 | load_pixel (const float *ptr) |
| static float4 | load_pixel (const float2 *ptr) |
| static float4 | load_pixel (const float3 *ptr) |
| static float4 | load_pixel (const float4 *ptr) |
| static void | store_pixel (float4 pix, uchar4 *ptr) |
| static void | store_pixel (float4 pix, float *ptr) |
| static void | store_pixel (float4 pix, float2 *ptr) |
| static void | store_pixel (float4 pix, float3 *ptr) |
| static void | store_pixel (float4 pix, float4 *ptr) |
| template<typename T> | |
| static void | instantiate_pixel_op (T &, const ImBuf *ibuf, int newx, int newy, uchar4 *dst_byte, float *dst_float, bool threaded) |
| static void | scale_down_x_func (const ImBuf *ibuf, int newx, int newy, uchar4 *dst_byte, float *dst_float, bool threaded) |
| static void | scale_down_y_func (const ImBuf *ibuf, int newx, int newy, uchar4 *dst_byte, float *dst_float, bool threaded) |
| static void | scale_up_x_func (const ImBuf *ibuf, int newx, int newy, uchar4 *dst_byte, float *dst_float, bool threaded) |
| static void | scale_up_y_func (const ImBuf *ibuf, int newx, int newy, uchar4 *dst_byte, float *dst_float, bool threaded) |
| static void | scale_with_function (ImBuf *ibuf, int newx, int newy, ScaleFunction func, bool threaded) |
| static void | imb_scale_box (ImBuf *ibuf, uint newx, uint newy, bool threaded) |
| template<typename T> | |
| static void | scale_nearest (const T *src, T *dst, int ibufx, int ibufy, int newx, int newy, blender::IndexRange y_range) |
| static void | scale_nearest_func (const ImBuf *ibuf, int newx, int newy, uchar4 *dst_byte, float *dst_float, bool threaded) |
| static void | scale_bilinear_func (const ImBuf *ibuf, int newx, int newy, uchar4 *dst_byte, float *dst_float, bool threaded) |
| bool | IMB_scale (ImBuf *ibuf, uint newx, uint newy, IMBScaleFilter filter, bool threaded) |
| ImBuf * | IMB_scale_into_new (const ImBuf *ibuf, uint newx, uint newy, IMBScaleFilter filter, bool threaded) |
| using blender::float2 |
Definition at line 618 of file BLI_math_vector_types.hh.
| using blender::float3 |
Definition at line 619 of file BLI_math_vector_types.hh.
| using blender::float4 |
Definition at line 620 of file BLI_math_vector_types.hh.
| using ScaleFunction |
Definition at line 336 of file scaling.cc.
| using blender::uchar4 |
Definition at line 599 of file BLI_math_vector_types.hh.
|
static |
Definition at line 29 of file scaling.cc.
References ImBuf::byte_buffer, ImBuf::channels, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, MEM_freeN(), and MEM_malloc_arrayN().
Referenced by IMB_scale_into_new(), and scale_with_function().
| bool IMB_scale | ( | ImBuf * | ibuf, |
| unsigned int | newx, | ||
| unsigned int | newy, | ||
| IMBScaleFilter | filter, | ||
| bool | threaded = true ) |
Scale/resize image to new dimensions. Return true if ibuf is modified.
Definition at line 465 of file scaling.cc.
References Bilinear, BLI_assert_msg, Box, filter, imb_scale_box(), Nearest, scale_bilinear_func(), scale_nearest_func(), scale_with_function(), ImBuf::x, and ImBuf::y.
Referenced by accessor_get_ibuf(), BKE_icon_geom_rasterize(), BKE_image_preview(), BKE_image_scale(), BKE_previewimg_ensure(), blend_file_thumb_from_camera(), blend_file_thumb_from_screenshot(), get_undistorted_ibuf(), icon_verify_datatoc(), image_scale_exec(), imb_gpu_get_data(), imb_stereo3d_squeeze_ImBuf(), imb_stereo3d_unsqueeze_ImBuf(), Freestyle::Canvas::loadMap(), py_imbuf_resize(), blender::imbuf::tests::scale_2x_smaller(), blender::imbuf::tests::scale_fractional_larger(), blender::imbuf::tests::scale_to_1x1(), blender::seq::scale_to_thumbnail_size(), thumb_create_ex(), ui_draw_but_IMAGE(), ui_tooltip_from_clip(), update_do_scale(), wm_block_splash_banner_image(), and wm_block_splash_image().
Definition at line 365 of file scaling.cc.
References scale_down_x_func(), scale_down_y_func(), scale_up_x_func(), scale_up_y_func(), scale_with_function(), ImBuf::x, x, ImBuf::y, and y.
Referenced by IMB_scale().
| ImBuf * IMB_scale_into_new | ( | const ImBuf * | ibuf, |
| unsigned int | newx, | ||
| unsigned int | newy, | ||
| IMBScaleFilter | filter, | ||
| bool | threaded = true ) |
Scale/resize image to new dimensions, into a newly created result image. Metadata of input image (if any) is copied into the result image.
Definition at line 489 of file scaling.cc.
References alloc_scale_dst_buffers(), Bilinear, BLI_assert_msg, Box, ImBuf::byte_buffer, ImBuf::channels, ImBuf::colormanage_flag, ImBufByteBuffer::colorspace, ImBufFloatBuffer::colorspace, filter, ImBuf::float_buffer, IB_DO_NOT_TAKE_OWNERSHIP, IB_TAKE_OWNERSHIP, IB_uninitialized_pixels, IMB_allocImBuf(), IMB_assign_byte_buffer(), IMB_assign_float_buffer(), IMB_dupImBuf(), IMB_initImBuf(), IMB_metadata_copy(), MEM_freeN(), Nearest, ImBuf::planes, scale_bilinear_func(), scale_down_x_func(), scale_down_y_func(), scale_nearest_func(), scale_up_x_func(), scale_up_y_func(), ImBuf::x, x, ImBuf::y, and y.
Referenced by blender::ed::asset::generate_previewimg_from_buffer(), icon_copy_rect(), movieclip_build_proxy_ibuf(), and blender::seq::seq_proxy_build_frame().
|
static |
Definition at line 277 of file scaling.cc.
References ImBuf::byte_buffer, ImBuf::channels, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, T, ImBuf::x, and ImBuf::y.
Referenced by scale_down_x_func(), scale_down_y_func(), scale_up_x_func(), and scale_up_y_func().
Definition at line 56 of file scaling.cc.
References ptr.
Definition at line 60 of file scaling.cc.
References ptr.
Definition at line 64 of file scaling.cc.
References ptr.
Definition at line 68 of file scaling.cc.
References ptr.
Definition at line 52 of file scaling.cc.
References ptr.
Referenced by ScaleDownX::op(), ScaleDownY::op(), ScaleUpX::op(), and ScaleUpY::op().
|
static |
Definition at line 436 of file scaling.cc.
References ImBuf::channels, ImBufFloatBuffer::data, float, ImBuf::float_buffer, blender::imbuf::interpolate_bilinear_byte(), blender::math::interpolate_bilinear_fl(), blender::threading::parallel_for(), v, ImBuf::x, x, ImBuf::y, and y.
Referenced by IMB_scale(), and IMB_scale_into_new().
|
static |
Definition at line 308 of file scaling.cc.
References instantiate_pixel_op().
Referenced by imb_scale_box(), and IMB_scale_into_new().
|
static |
Definition at line 315 of file scaling.cc.
References instantiate_pixel_op().
Referenced by imb_scale_box(), and IMB_scale_into_new().
|
static |
Definition at line 382 of file scaling.cc.
References blender::IndexRange::first(), T, UNUSED_VARS, x, and y.
Referenced by scale_nearest_func().
|
static |
Definition at line 403 of file scaling.cc.
References ImBuf::byte_buffer, ImBuf::channels, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, blender::threading::parallel_for(), scale_nearest(), ImBuf::x, and ImBuf::y.
Referenced by IMB_scale(), and IMB_scale_into_new().
|
static |
Definition at line 322 of file scaling.cc.
References instantiate_pixel_op().
Referenced by imb_scale_box(), and IMB_scale_into_new().
|
static |
Definition at line 329 of file scaling.cc.
References instantiate_pixel_op().
Referenced by imb_scale_box(), and IMB_scale_into_new().
|
static |
Definition at line 339 of file scaling.cc.
References alloc_scale_dst_buffers(), IB_TAKE_OWNERSHIP, IMB_assign_byte_buffer(), IMB_assign_float_buffer(), IMB_free_byte_pixels(), IMB_free_float_pixels(), ImBuf::x, and ImBuf::y.
Referenced by IMB_scale(), and imb_scale_box().
Definition at line 76 of file scaling.cc.
Definition at line 80 of file scaling.cc.
References ptr.
Definition at line 84 of file scaling.cc.
References ptr.
Definition at line 88 of file scaling.cc.
References ptr.
Definition at line 72 of file scaling.cc.
References ptr, and blender::math::round().
Referenced by ScaleDownX::op(), ScaleDownY::op(), ScaleUpX::op(), and ScaleUpY::op().