Vincent Povirk : gdiplus: Add PNG to the decoders list.

Alexandre Julliard julliard at winehq.org
Sat Aug 29 11:36:09 CDT 2009


Module: wine
Branch: master
Commit: 2f0b4bf36b3f87417976661d1807fbf16452d00b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2f0b4bf36b3f87417976661d1807fbf16452d00b

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Tue Aug 25 16:53:56 2009 -0500

gdiplus: Add PNG to the decoders list.

---

 dlls/gdiplus/image.c |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index e65182f..6ec2c64 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -1426,6 +1426,7 @@ typedef enum {
     GIF,
     EMF,
     WMF,
+    PNG,
     ICO,
     NUM_CODECS
 } ImageFormat;
@@ -1594,6 +1595,13 @@ static const WCHAR wmf_format[] = {'W','M','F',0};
 static const BYTE wmf_sig_pattern[] = { 0xd7, 0xcd };
 static const BYTE wmf_sig_mask[] = { 0xFF, 0xFF };
 
+static const WCHAR png_codecname[] = {'B', 'u', 'i','l', 't', '-','i', 'n', ' ', 'P','N','G', 0};
+static const WCHAR png_extension[] = {'*','.','P','N','G',0};
+static const WCHAR png_mimetype[] = {'i','m','a','g','e','/','p','n','g', 0};
+static const WCHAR png_format[] = {'P','N','G',0};
+static const BYTE png_sig_pattern[] = { 137, 80, 78, 71, 13, 10, 26, 10, };
+static const BYTE png_sig_mask[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
+
 static const WCHAR ico_codecname[] = {'B', 'u', 'i','l', 't', '-','i', 'n', ' ', 'I','C','O', 0};
 static const WCHAR ico_extension[] = {'*','.','I','C','O',0};
 static const WCHAR ico_mimetype[] = {'i','m','a','g','e','/','x','-','i','c','o','n', 0};
@@ -1693,6 +1701,24 @@ static const struct image_codec codecs[NUM_CODECS] = {
         NULL
     },
     {
+        { /* PNG */
+            /* Clsid */              { 0x557cf406, 0x1a04, 0x11d3, { 0x9a, 0x73, 0x0, 0x0, 0xf8, 0x1e, 0xf3, 0x2e } },
+            /* FormatID */           { 0xb96b3cafU, 0x0728U, 0x11d3U, {0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} },
+            /* CodecName */          png_codecname,
+            /* DllName */            NULL,
+            /* FormatDescription */  png_format,
+            /* FilenameExtension */  png_extension,
+            /* MimeType */           png_mimetype,
+            /* Flags */              ImageCodecFlagsDecoder | ImageCodecFlagsSupportBitmap | ImageCodecFlagsBuiltin,
+            /* Version */            1,
+            /* SigCount */           1,
+            /* SigSize */            8,
+            /* SigPattern */         png_sig_pattern,
+            /* SigMask */            png_sig_mask,
+        },
+        NULL
+    },
+    {
         { /* ICO */
             /* Clsid */              { 0x557cf407, 0x1a04, 0x11d3, { 0x9a, 0x73, 0x0, 0x0, 0xf8, 0x1e, 0xf3, 0x2e } },
             /* FormatID */           { 0xb96b3cabU, 0x0728U, 0x11d3U, {0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} },




More information about the wine-cvs mailing list