int SavePNG(char* filename, int tile) { RGBQUAD temp={0,0,0,0}; unsigned char pn=0; int x,y; unsigned char val=0; int k=0; BOOL test; int alpha; pn=canvas[tile].table; FIBITMAP *bitmap=FreeImage_Allocate(canvas[tile].width,canvas[tile].height,32,0,0,0); for(y=0;y