dplug.graphics.stb_image_resize

Resizer ported to D from C. Removed a few features that did'nt make sense in Dplug. Added Ryhor Spivak work on Lanczos filter... also added a few more lanczos kernels.

Members

Aliases

stbir__kernel_fn
alias stbir__kernel_fn = float function(float x, float scale)
Undocumented in source.
stbir__support_fn
alias stbir__support_fn = float function(float scale)
Undocumented in source.
stbir_colorspace
alias stbir_colorspace = int
Undocumented in source.
stbir_datatype
alias stbir_datatype = int

///////////////////////////////////////////////////////////////////////////

stbir_edge
alias stbir_edge = int
Undocumented in source.
stbir_filter
alias stbir_filter = int

///////////////////////////////////////////////////////////////////////////

Enums

STBIR_COLORSPACE_LINEAR
anonymousenum STBIR_COLORSPACE_LINEAR
Undocumented in source.
STBIR_EDGE_CLAMP
anonymousenum STBIR_EDGE_CLAMP
Undocumented in source.
STBIR_FILTER_DEFAULT
anonymousenum STBIR_FILTER_DEFAULT
Undocumented in source.
STBIR_TYPE_UINT8
anonymousenum STBIR_TYPE_UINT8
Undocumented in source.

Functions

STBIR_FREE
void STBIR_FREE(void* p, void* context)
Undocumented in source. Be warned that the author may not have intended to support it.
STBIR_MALLOC
void* STBIR_MALLOC(size_t size, void* context)
Undocumented in source. Be warned that the author may not have intended to support it.
STBIR__DECODE
int STBIR__DECODE(int type, int colorspace)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__filter_catmullrom
float stbir__filter_catmullrom(float x, float s)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__filter_cubic
float stbir__filter_cubic(float x, float s)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__filter_lanczos
float stbir__filter_lanczos(float x, float s)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__filter_mitchell
float stbir__filter_mitchell(float x, float s)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__filter_mk2013
float stbir__filter_mk2013(float x, float s)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__filter_mks2013
float stbir__filter_mks2013(float x, float s)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__filter_mks2013_hs
float stbir__filter_mks2013_hs(float x, float s)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__filter_mks2021
float stbir__filter_mks2021(float x, float s)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__filter_trapezoid
float stbir__filter_trapezoid(float x, float scale)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__filter_triangle
float stbir__filter_triangle(float x, float s)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__linear_to_srgb
float stbir__linear_to_srgb(float f)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__linear_to_srgb_uchar
ubyte stbir__linear_to_srgb_uchar(float in_)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__linear_to_srgb_uchar
__m128i stbir__linear_to_srgb_uchar(__m128 in_)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__min
int stbir__min(int a, int b)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__saturate
float stbir__saturate(float x)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__srgb_to_linear
float stbir__srgb_to_linear(float f)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__support_five
float stbir__support_five(float s)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__support_four
float stbir__support_four(float s)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__support_one
float stbir__support_one(float s)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__support_three
float stbir__support_three(float s)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__support_trapezoid
float stbir__support_trapezoid(float scale)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__support_two
float stbir__support_two(float s)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__support_zero
float stbir__support_zero(float s)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir_resize
int stbir_resize(void* input_pixels, int input_w, int input_h, int input_stride_in_bytes, void* output_pixels, int output_w, int output_h, int output_stride_in_bytes, stbir_datatype datatype, int num_channels, int alpha_channel, int flags, stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, stbir_filter filter_horizontal, stbir_filter filter_vertical, stbir_colorspace space, void* alloc_context)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir_resize_region
int stbir_resize_region(void* input_pixels, int input_w, int input_h, int input_stride_in_bytes, void* output_pixels, int output_w, int output_h, int output_stride_in_bytes, stbir_datatype datatype, int num_channels, int alpha_channel, int flags, stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, stbir_filter filter_horizontal, stbir_filter filter_vertical, stbir_colorspace space, void* alloc_context, float s0, float t0, float s1, float t1)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir_resize_subpixel
int stbir_resize_subpixel(void* input_pixels, int input_w, int input_h, int input_stride_in_bytes, void* output_pixels, int output_w, int output_h, int output_stride_in_bytes, stbir_datatype datatype, int num_channels, int alpha_channel, int flags, stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, stbir_filter filter_horizontal, stbir_filter filter_vertical, stbir_colorspace space, void* alloc_context, float x_scale, float y_scale, float x_offset, float y_offset)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir_resize_uint16
int stbir_resize_uint16(const(ushort)* input_pixels, int input_w, int input_h, int input_stride_in_bytes, ushort* output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int filter, void* alloc_context)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir_resize_uint16_generic
int stbir_resize_uint16_generic(ushort* input_pixels, int input_w, int input_h, int input_stride_in_bytes, ushort* output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, void* alloc_context)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir_resize_uint8
int stbir_resize_uint8(const(ubyte)* input_pixels, int input_w, int input_h, int input_stride_in_bytes, ubyte* output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int filter, void* alloc_context)

///////////////////////////////////////////////////////////////////////////

stbir_resize_uint8_generic
int stbir_resize_uint8_generic(const(ubyte)* input_pixels, int input_w, int input_h, int input_stride_in_bytes, ubyte* output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, void* alloc_context)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir_resize_uint8_srgb
int stbir_resize_uint8_srgb(const(ubyte)* input_pixels, int input_w, int input_h, int input_stride_in_bytes, ubyte* output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, void* alloc_context, int filter)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir_resize_uint8_srgb_edgemode
int stbir_resize_uint8_srgb_edgemode(const(ubyte)* input_pixels, int input_w, int input_h, int input_stride_in_bytes, ubyte* output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, stbir_edge edge_wrap_mode)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

DPLUG_USE_STB_IMAGE_RESIZE_V2
enum DPLUG_USE_STB_IMAGE_RESIZE_V2;
Undocumented in source.
STBIR_ALPHA_CHANNEL_NONE
enum STBIR_ALPHA_CHANNEL_NONE;
Undocumented in source.
STBIR_DEFAULT_FILTER_DOWNSAMPLE
enum STBIR_DEFAULT_FILTER_DOWNSAMPLE;
Undocumented in source.
STBIR_DEFAULT_FILTER_UPSAMPLE
enum STBIR_DEFAULT_FILTER_UPSAMPLE;
Undocumented in source.
STBIR_FLAG_ALPHA_PREMULTIPLIED
enum STBIR_FLAG_ALPHA_PREMULTIPLIED;
Undocumented in source.
STBIR_FLAG_ALPHA_USES_COLORSPACE
enum STBIR_FLAG_ALPHA_USES_COLORSPACE;
Undocumented in source.
STBIR_MAX_CHANNELS
enum STBIR_MAX_CHANNELS;
Undocumented in source.

Static functions

stbir__add_empty_ring_buffer_entry
float* stbir__add_empty_ring_buffer_entry(stbir__info* stbir_info, int n)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__buffer_loop_downsample
void stbir__buffer_loop_downsample(stbir__info* stbir_info)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__buffer_loop_upsample
void stbir__buffer_loop_upsample(stbir__info* stbir_info)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__calculate_coefficients_downsample
void stbir__calculate_coefficients_downsample(stbir_filter filter, float scale_ratio, int out_first_pixel, int out_last_pixel, float out_center_of_in, stbir__contributors* contributor, float* coefficient_group)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__calculate_coefficients_upsample
void stbir__calculate_coefficients_upsample(stbir_filter filter, float scale, int in_first_pixel, int in_last_pixel, float in_center_of_out, stbir__contributors* contributor, float* coefficient_group)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__calculate_filters
void stbir__calculate_filters(stbir__contributors* contributors, float* coefficients, stbir_filter filter, float scale_ratio, float shift, int input_size, int output_size)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__calculate_memory
uint stbir__calculate_memory(stbir__info* info)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__calculate_sample_range_downsample
void stbir__calculate_sample_range_downsample(int n, float in_pixels_radius, float scale_ratio, float out_shift, int* out_first_pixel, int* out_last_pixel, float* out_center_of_in)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__calculate_sample_range_upsample
void stbir__calculate_sample_range_upsample(int n, float out_filter_radius, float scale_ratio, float out_shift, int* in_first_pixel, int* in_last_pixel, float* in_center_of_out)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__calculate_transform
void stbir__calculate_transform(stbir__info* info, float s0, float t0, float s1, float t1, float* transform)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__choose_filter
void stbir__choose_filter(stbir__info* info, stbir_filter h_filter, stbir_filter v_filter)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__decode_and_resample_downsample
void stbir__decode_and_resample_downsample(stbir__info* stbir_info, int n)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__decode_and_resample_upsample
void stbir__decode_and_resample_upsample(stbir__info* stbir_info, int n)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__decode_scanline
void stbir__decode_scanline(stbir__info* stbir_info, int n)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__edge_wrap
int stbir__edge_wrap(stbir_edge edge, int n, int max)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__edge_wrap_slow
int stbir__edge_wrap_slow(stbir_edge edge, int n, int max)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__empty_ring_buffer
void stbir__empty_ring_buffer(stbir__info* stbir_info, int first_necessary_scanline)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__encode_scanline
void stbir__encode_scanline(stbir__info* stbir_info, int num_pixels, void* output_buffer, float* encode_buffer, int channels, int alpha_channel, int decode)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__get_coefficient
float* stbir__get_coefficient(float* coefficients, stbir_filter filter, float scale, int n, int c)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__get_coefficient_width
int stbir__get_coefficient_width(stbir_filter filter, float scale)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__get_contributor
stbir__contributors* stbir__get_contributor(stbir__contributors* contributors, int n)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__get_contributors
int stbir__get_contributors(float scale, stbir_filter filter, int input_size, int output_size)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__get_decode_buffer
float* stbir__get_decode_buffer(stbir__info* stbir_info)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__get_filter_pixel_margin
int stbir__get_filter_pixel_margin(stbir_filter filter, float scale)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__get_filter_pixel_width
int stbir__get_filter_pixel_width(stbir_filter filter, float scale)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__get_ring_buffer_entry
float* stbir__get_ring_buffer_entry(float* ring_buffer, int index, int ring_buffer_length)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__get_ring_buffer_scanline
float* stbir__get_ring_buffer_scanline(int get_scanline, float* ring_buffer, int begin_index, int first_scanline, int ring_buffer_num_entries, int ring_buffer_length)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__get_total_horizontal_coefficients
int stbir__get_total_horizontal_coefficients(stbir__info* info)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__get_total_vertical_coefficients
int stbir__get_total_vertical_coefficients(stbir__info* info)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__normalize_downsample_coefficients
void stbir__normalize_downsample_coefficients(stbir__contributors* contributors, float* coefficients, stbir_filter filter, float scale_ratio, int input_size, int output_size)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__resample_horizontal_downsample
void stbir__resample_horizontal_downsample(stbir__info* stbir_info, float* output_buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__resample_horizontal_upsample
void stbir__resample_horizontal_upsample(stbir__info* stbir_info, float* output_buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__resample_vertical_downsample
void stbir__resample_vertical_downsample(stbir__info* stbir_info, int n)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__resample_vertical_upsample
void stbir__resample_vertical_upsample(stbir__info* stbir_info, int n)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__resize_allocated
int stbir__resize_allocated(stbir__info* info, void* input_data, int input_stride_in_bytes, void* output_data, int output_stride_in_bytes, int alpha_channel, uint flags, stbir_datatype type, stbir_edge edge_horizontal, stbir_edge edge_vertical, stbir_colorspace colorspace, void* tempmem, size_t tempmem_size_in_bytes)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__resize_arbitrary
int stbir__resize_arbitrary(void* alloc_context, void* input_data, int input_w, int input_h, int input_stride_in_bytes, void* output_data, int output_w, int output_h, int output_stride_in_bytes, float s0, float t0, float s1, float t1, float* transform, int channels, int alpha_channel, uint flags, stbir_datatype type, stbir_filter h_filter, stbir_filter v_filter, stbir_edge edge_horizontal, stbir_edge edge_vertical, stbir_colorspace colorspace)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__setup
void stbir__setup(stbir__info* info, int input_w, int input_h, int output_w, int output_h, int channels)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__use_height_upsampling
int stbir__use_height_upsampling(stbir__info* stbir_info)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__use_upsampling
int stbir__use_upsampling(float ratio)
Undocumented in source. Be warned that the author may not have intended to support it.
stbir__use_width_upsampling
int stbir__use_width_upsampling(stbir__info* stbir_info)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

fp32_to_srgb8_tab4
uint[104] fp32_to_srgb8_tab4;
Undocumented in source.
stbir__filter_info_table
stbir__filter_info[14] stbir__filter_info_table;
Undocumented in source.
stbir__max_uint16_as_float
float stbir__max_uint16_as_float;
Undocumented in source.
stbir__max_uint32_as_float
double stbir__max_uint32_as_float;
Undocumented in source.
stbir__max_uint8_as_float
float stbir__max_uint8_as_float;
Undocumented in source.
stbir__srgb_uchar_to_linear_float
float[256] stbir__srgb_uchar_to_linear_float;
Undocumented in source.
stbir__type_size
ubyte[4] stbir__type_size;
Undocumented in source.

Structs

STBAllocatorContext
struct STBAllocatorContext
Undocumented in source.
stbir__contributors
struct stbir__contributors
Undocumented in source.
stbir__filter_info
struct stbir__filter_info
Undocumented in source.
stbir__info
struct stbir__info
Undocumented in source.

Unions

stbir__FP32
union stbir__FP32
Undocumented in source.

Variables

STBIR_ALPHA_EPSILON
enum float STBIR_ALPHA_EPSILON;
Undocumented in source.

Meta