mirror of
https://github.com/nothings/stb
synced 2024-12-16 04:42:42 +03:00
Use height, not width, for correct progress report.
This commit is contained in:
parent
4b69c0637e
commit
8355ea1184
@ -1512,7 +1512,7 @@ static void stbir__empty_ring_buffer(stbir__info* stbir_info, int first_necessar
|
|||||||
int output_row_start = stbir_info->ring_buffer_first_scanline * output_stride_bytes;
|
int output_row_start = stbir_info->ring_buffer_first_scanline * output_stride_bytes;
|
||||||
float* ring_buffer_entry = stbir__get_ring_buffer_entry(ring_buffer, stbir_info->ring_buffer_begin_index, ring_buffer_length);
|
float* ring_buffer_entry = stbir__get_ring_buffer_entry(ring_buffer, stbir_info->ring_buffer_begin_index, ring_buffer_length);
|
||||||
stbir__encode_scanline(stbir_info, output_w, (char *) output_data + output_row_start, ring_buffer_entry, channels, alpha_channel, decode);
|
stbir__encode_scanline(stbir_info, output_w, (char *) output_data + output_row_start, ring_buffer_entry, channels, alpha_channel, decode);
|
||||||
STBIR_PROGRESS_REPORT((float)stbir_info->ring_buffer_first_scanline / output_w);
|
STBIR_PROGRESS_REPORT((float)stbir_info->ring_buffer_first_scanline / stbir_info->output_h);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stbir_info->ring_buffer_first_scanline == stbir_info->ring_buffer_last_scanline)
|
if (stbir_info->ring_buffer_first_scanline == stbir_info->ring_buffer_last_scanline)
|
||||||
|
Loading…
Reference in New Issue
Block a user