Oops, that was height.
This commit is contained in:
@@ -180,7 +180,7 @@ char *generate_filename(void)
|
|||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SNAP_WIDTH 223
|
#define SNAP_HEIGHT 223
|
||||||
void Grab_PNG_Data(void)
|
void Grab_PNG_Data(void)
|
||||||
{
|
{
|
||||||
char *filename;
|
char *filename;
|
||||||
@@ -198,14 +198,14 @@ void Grab_PNG_Data(void)
|
|||||||
filename = generate_filename();
|
filename = generate_filename();
|
||||||
|
|
||||||
/*Allocate image buffer for DIB data*/
|
/*Allocate image buffer for DIB data*/
|
||||||
DIBits=(unsigned char*)malloc(scanline*SNAP_WIDTH);
|
DIBits=(unsigned char*)malloc(scanline*SNAP_HEIGHT);
|
||||||
|
|
||||||
/*Cast pointer to 32-bit data type*/
|
/*Cast pointer to 32-bit data type*/
|
||||||
DBits=(unsigned int*) DIBits;
|
DBits=(unsigned int*) DIBits;
|
||||||
|
|
||||||
/*Use zsKnight's 16 to 32 bit color conversion*/
|
/*Use zsKnight's 16 to 32 bit color conversion*/
|
||||||
pixel=(unsigned short*)(vidbuffer);
|
pixel=(unsigned short*)(vidbuffer);
|
||||||
for(i=0;i<SNAP_WIDTH;i++)
|
for(i=0;i<SNAP_HEIGHT;i++)
|
||||||
{
|
{
|
||||||
for(j=0;j<256;j++)
|
for(j=0;j<256;j++)
|
||||||
{
|
{
|
||||||
@@ -218,7 +218,7 @@ void Grab_PNG_Data(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*compress and write the PNG*/
|
/*compress and write the PNG*/
|
||||||
Png_Dump(filename, 256, SNAP_WIDTH, DIBits, is_bgr_data);
|
Png_Dump(filename, 256, SNAP_HEIGHT, DIBits, is_bgr_data);
|
||||||
|
|
||||||
free(DIBits);
|
free(DIBits);
|
||||||
free(filename);
|
free(filename);
|
||||||
|
|||||||
Reference in New Issue
Block a user