Same deal with height.
This commit is contained in:
parent
ebe0473d8b
commit
043fa28c11
@ -1147,7 +1147,7 @@ static void stbr__buffer_loop_downsample(stbr__info* stbr_info)
|
||||
{
|
||||
int y;
|
||||
float scale_ratio = (float)stbr_info->output_h / stbr_info->input_h;
|
||||
float in_pixels_radius = stbr__filter_info_table[stbr_info->filter].support;
|
||||
float in_pixels_radius = stbr__filter_info_table[stbr_info->filter].support / scale_ratio;
|
||||
int max_y = stbr_info->input_h + stbr__get_filter_texel_margin(stbr_info->filter, stbr_info->input_h, stbr_info->output_h);
|
||||
|
||||
STBR_DEBUG_ASSERT(!stbr__use_height_upsampling(stbr_info));
|
||||
|
@ -137,12 +137,26 @@ void test_suite()
|
||||
resize_image("barbara.png", (float)i / 100, 1, STBR_FILTER_CATMULLROM, STBR_EDGE_CLAMP, outname);
|
||||
}
|
||||
|
||||
for (int i = 110; i < 1000; i += 10)
|
||||
for (int i = 110; i < 500; i += 10)
|
||||
{
|
||||
char outname[200];
|
||||
sprintf(outname, "test-output/barbara-width-%d.jpg", i);
|
||||
resize_image("barbara.png", (float)i / 100, 1, STBR_FILTER_CATMULLROM, STBR_EDGE_CLAMP, outname);
|
||||
}
|
||||
|
||||
for (int i = 10; i < 100; i++)
|
||||
{
|
||||
char outname[200];
|
||||
sprintf(outname, "test-output/barbara-height-%d.jpg", i);
|
||||
resize_image("barbara.png", 1, (float)i / 100, STBR_FILTER_CATMULLROM, STBR_EDGE_CLAMP, outname);
|
||||
}
|
||||
|
||||
for (int i = 110; i < 500; i += 10)
|
||||
{
|
||||
char outname[200];
|
||||
sprintf(outname, "test-output/barbara-height-%d.jpg", i);
|
||||
resize_image("barbara.png", 1, (float)i / 100, STBR_FILTER_CATMULLROM, STBR_EDGE_CLAMP, outname);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user