Ejemplo n.º 1
0
BOOL WLog_ImageMessage_Write(char* filename, void* data, int width, int height, int bpp)
{
	int status;

	status = winpr_bitmap_write(filename, data, width, height, bpp);

	if (status < 0)
		return FALSE;

	return TRUE;
}
Ejemplo n.º 2
0
int winpr_image_write(wImage* image, const char* filename)
{
	int status = -1;

	if (image->type == WINPR_IMAGE_BITMAP)
	{
		status = winpr_bitmap_write(filename, image->data, image->width, image->height, image->bitsPerPixel);
	}
	else
	{
		int lodepng_status;

		lodepng_status = lodepng_encode32_file(filename, image->data, image->width, image->height);

		status = (lodepng_status) ? -1 : 1;
	}

	return status;
}