bugfix setall
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
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;
|
||||
|
BIN
testimg/test_green.png
Normal file
BIN
testimg/test_green.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 353 B |
BIN
testimg/test_resize.png
Normal file
BIN
testimg/test_resize.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
BIN
testimg/test_resize2.png
Normal file
BIN
testimg/test_resize2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 107 KiB |
Reference in New Issue
Block a user