bugfix setall

This commit is contained in:
2025-06-04 21:31:34 -04:00
parent 8dc950e895
commit 8f21dffcc8
9 changed files with 17 additions and 2 deletions

Binary file not shown.

View File

@ -562,8 +562,8 @@ namespace ams
for(I=I0;I<I1;I++)
{
Ix = I0%img->Nx;
Iy = I0/img->Ny;
Ix = I%img->Nx;
Iy = I/img->Nx;
img->data[0 + 4*(Ix + img->Nx*Iy)] = color.R;
img->data[1 + 4*(Ix + img->Nx*Iy)] = color.G;

View File

@ -46,6 +46,21 @@ namespace ams
sprintf(fname2,"../testimg/test_transpose.png");
write_image(fname2,&img2);
img2 = img;
img2.resize(img.Nx/2,img.Ny/2);
sprintf(fname2,"../testimg/test_resize.png");
write_image(fname2,&img2);
img2 = img;
img2.resize(img.Nx*2,img.Ny*2);
sprintf(fname2,"../testimg/test_resize2.png");
write_image(fname2,&img2);
img2.resize(200,100);
img2.setall(amspixel(0,255,0,255));
sprintf(fname2,"../testimg/test_green.png");
write_image(fname2,&img2);
return;

BIN
testimg/test_green.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

BIN
testimg/test_resize.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
testimg/test_resize2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB