Commit 7eb1f5d6 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

windowscodecs: Add initial implementation of the GIF encoder.

parent b95fe88f
...@@ -5115,14 +5115,13 @@ static void test_supported_encoders(void) ...@@ -5115,14 +5115,13 @@ static void test_supported_encoders(void)
{ {
LPCWSTR mime; LPCWSTR mime;
const GUID *format; const GUID *format;
BOOL todo;
} td[] = } td[] =
{ {
{ bmp_mimetype, &ImageFormatBMP, FALSE }, { bmp_mimetype, &ImageFormatBMP },
{ jpeg_mimetype, &ImageFormatJPEG, FALSE }, { jpeg_mimetype, &ImageFormatJPEG },
{ gif_mimetype, &ImageFormatGIF, TRUE }, { gif_mimetype, &ImageFormatGIF },
{ tiff_mimetype, &ImageFormatTIFF, FALSE }, { tiff_mimetype, &ImageFormatTIFF },
{ png_mimetype, &ImageFormatPNG, FALSE } { png_mimetype, &ImageFormatPNG }
}; };
GUID format, clsid; GUID format, clsid;
BOOL ret; BOOL ret;
...@@ -5148,8 +5147,7 @@ static void test_supported_encoders(void) ...@@ -5148,8 +5147,7 @@ static void test_supported_encoders(void)
ok(hr == S_OK, "CreateStreamOnHGlobal error %#x\n", hr); ok(hr == S_OK, "CreateStreamOnHGlobal error %#x\n", hr);
status = GdipSaveImageToStream((GpImage *)bm, stream, &clsid, NULL); status = GdipSaveImageToStream((GpImage *)bm, stream, &clsid, NULL);
todo_wine_if (td[i].todo) ok(status == Ok, "GdipSaveImageToStream error %d\n", status);
ok(status == Ok, "GdipSaveImageToStream error %d\n", status);
IStream_Release(stream); IStream_Release(stream);
} }
......
...@@ -52,6 +52,7 @@ static const classinfo wic_classes[] = { ...@@ -52,6 +52,7 @@ static const classinfo wic_classes[] = {
{&CLSID_WICPngEncoder, PngEncoder_CreateInstance}, {&CLSID_WICPngEncoder, PngEncoder_CreateInstance},
{&CLSID_WICBmpEncoder, BmpEncoder_CreateInstance}, {&CLSID_WICBmpEncoder, BmpEncoder_CreateInstance},
{&CLSID_WICGifDecoder, GifDecoder_CreateInstance}, {&CLSID_WICGifDecoder, GifDecoder_CreateInstance},
{&CLSID_WICGifEncoder, GifEncoder_CreateInstance},
{&CLSID_WICIcoDecoder, IcoDecoder_CreateInstance}, {&CLSID_WICIcoDecoder, IcoDecoder_CreateInstance},
{&CLSID_WICJpegDecoder, JpegDecoder_CreateInstance}, {&CLSID_WICJpegDecoder, JpegDecoder_CreateInstance},
{&CLSID_WICJpegEncoder, JpegEncoder_CreateInstance}, {&CLSID_WICJpegEncoder, JpegEncoder_CreateInstance},
......
...@@ -1434,6 +1434,16 @@ static struct regsvr_encoder const encoder_list[] = { ...@@ -1434,6 +1434,16 @@ static struct regsvr_encoder const encoder_list[] = {
".bmp,.dib,.rle", ".bmp,.dib,.rle",
bmp_encode_formats bmp_encode_formats
}, },
{ &CLSID_WICGifEncoder,
"The Wine Project",
"GIF Encoder",
"1.0.0.0",
&GUID_VendorMicrosoft,
&GUID_ContainerFormatGif,
"image/gif",
".gif",
gif_formats
},
{ &CLSID_WICJpegEncoder, { &CLSID_WICJpegEncoder,
"The Wine Project", "The Wine Project",
"JPEG Encoder", "JPEG Encoder",
......
...@@ -143,6 +143,7 @@ extern HRESULT PngEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN ...@@ -143,6 +143,7 @@ extern HRESULT PngEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN
extern HRESULT BmpEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; extern HRESULT BmpEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
extern HRESULT DibDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; extern HRESULT DibDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
extern HRESULT GifDecoder_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN; extern HRESULT GifDecoder_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN;
extern HRESULT GifEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
extern HRESULT IcoDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; extern HRESULT IcoDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
extern HRESULT JpegDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; extern HRESULT JpegDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
extern HRESULT JpegEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; extern HRESULT JpegEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
......
...@@ -77,6 +77,13 @@ coclass WICBmpEncoder { interface IWICBitmapEncoder; } ...@@ -77,6 +77,13 @@ coclass WICBmpEncoder { interface IWICBitmapEncoder; }
coclass WICGifDecoder { interface IWICBitmapDecoder; } coclass WICGifDecoder { interface IWICBitmapDecoder; }
[ [
helpstring("WIC GIF Encoder"),
threading(both),
uuid(114f5598-0b22-40a0-86a1-c83ea495adbd)
]
coclass WICGifEncoder { interface IWICBitmapEncoder; }
[
helpstring("WIC ICO Decoder"), helpstring("WIC ICO Decoder"),
threading(both), threading(both),
uuid(c61bfcdf-2e0f-4aad-a8d7-e06bafebcdfe) uuid(c61bfcdf-2e0f-4aad-a8d7-e06bafebcdfe)
......
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