Commit 59810aa4 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

windowscodecs: Register the PNG decoder.

parent 568c7390
......@@ -777,7 +777,7 @@ static struct regsvr_coclass const coclass_list[] = {
/***********************************************************************
* decoder list
*/
static const BYTE mask_all[] = {0xff,0xff,0xff,0xff,0xff,0xff};
static const BYTE mask_all[] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
static const BYTE bmp_magic[] = {0x42,0x4d};
......@@ -838,6 +838,30 @@ static struct decoder_pattern const jpeg_patterns[] = {
{0}
};
static const BYTE png_magic[] = {137,80,78,71,13,10,26,10};
static GUID const * const png_formats[] = {
&GUID_WICPixelFormatBlackWhite,
&GUID_WICPixelFormat2bppGray,
&GUID_WICPixelFormat4bppGray,
&GUID_WICPixelFormat8bppGray,
&GUID_WICPixelFormat16bppGray,
&GUID_WICPixelFormat32bppBGRA,
&GUID_WICPixelFormat64bppRGBA,
&GUID_WICPixelFormat1bppIndexed,
&GUID_WICPixelFormat2bppIndexed,
&GUID_WICPixelFormat4bppIndexed,
&GUID_WICPixelFormat8bppIndexed,
&GUID_WICPixelFormat24bppBGR,
&GUID_WICPixelFormat48bppRGB,
NULL
};
static struct decoder_pattern const png_patterns[] = {
{8,0,png_magic,mask_all,0},
{0}
};
static struct regsvr_decoder const decoder_list[] = {
{ &CLSID_WICBmpDecoder,
"The Wine Project",
......@@ -879,6 +903,16 @@ static struct regsvr_decoder const decoder_list[] = {
jpeg_formats,
jpeg_patterns
},
{ &CLSID_WICPngDecoder,
"The Wine Project",
"PNG Decoder",
"1.0.0.0",
&GUID_VendorMicrosoft,
"image/png",
".png",
png_formats,
png_patterns
},
{ NULL } /* list terminator */
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment