bugfix setall

master
Aaron 2 days ago
parent 8dc950e895
commit 8f21dffcc8

Binary file not shown.

@ -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;

@ -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;

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Loading…
Cancel
Save