mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-07-13 23:57:34 +02:00
render-cg: round RGB16 images to even widths
This commit is contained in:
parent
e57efb5e37
commit
26c5b76037
1 changed files with 3 additions and 2 deletions
|
@ -33,9 +33,10 @@ void bopti_render(bopti_image_t const *img, struct box *box)
|
||||||
if(profile == PX_R5G6B5 || profile == PX_R5G6B5A)
|
if(profile == PX_R5G6B5 || profile == PX_R5G6B5A)
|
||||||
{
|
{
|
||||||
/* Input stride */
|
/* Input stride */
|
||||||
int in = 2 * (img->width - w);
|
int true_width = img->width + (img->width & 1);
|
||||||
|
int in = 2 * (true_width - w);
|
||||||
|
|
||||||
data += 2 * (img->width * box->top + box->left);
|
data += 2 * (true_width * box->top + box->left);
|
||||||
|
|
||||||
if(profile == PX_R5G6B5)
|
if(profile == PX_R5G6B5)
|
||||||
bopti_r5g6b5(data, target, w, h, in, out);
|
bopti_r5g6b5(data, target, w, h, in, out);
|
||||||
|
|
Loading…
Add table
Reference in a new issue