mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
windowscodecs-GIF_Encoder: Update patchset.
This commit is contained in:
parent
4f64c0e0fb
commit
6997fa0121
@ -7200,8 +7200,8 @@ fi
|
||||
# Patchset windowscodecs-GIF_Encoder
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/windowscodecs/bmpencode.c, dlls/windowscodecs/clsfactory.c, dlls/windowscodecs/gifformat.c,
|
||||
# | dlls/windowscodecs/info.c, dlls/windowscodecs/jpegformat.c, dlls/windowscodecs/regsvr.c,
|
||||
# | * dlls/gdiplus/image.c, dlls/gdiplus/tests/image.c, dlls/windowscodecs/bmpencode.c, dlls/windowscodecs/clsfactory.c,
|
||||
# | dlls/windowscodecs/gifformat.c, dlls/windowscodecs/info.c, dlls/windowscodecs/jpegformat.c, dlls/windowscodecs/regsvr.c,
|
||||
# | dlls/windowscodecs/tiffformat.c, dlls/windowscodecs/wincodecs_private.h
|
||||
# |
|
||||
if test "$enable_windowscodecs_GIF_Encoder" -eq 1; then
|
||||
@ -7213,6 +7213,8 @@ if test "$enable_windowscodecs_GIF_Encoder" -eq 1; then
|
||||
patch_apply windowscodecs-GIF_Encoder/0006-windowscodecs-Implement-IWICBitmapEncoder-GetEncoder.patch
|
||||
patch_apply windowscodecs-GIF_Encoder/0007-windowscodecs-Avoid-crashing-if-no-IPropertyBag2-was.patch
|
||||
patch_apply windowscodecs-GIF_Encoder/0008-windowscodecs-Add-initial-implementation-of-the-GIF-.patch
|
||||
patch_apply windowscodecs-GIF_Encoder/0009-gdiplus-Fix-a-typo-in-GIF-container-format-passed-to.patch
|
||||
patch_apply windowscodecs-GIF_Encoder/0010-windowscodecs-Initialize-empty-property-bag-in-GIF-e.patch
|
||||
(
|
||||
echo '+ { "Dmitry Timoshkov", "windowscodecs: Implement IWICBitmapEncoder::GetEncoderInfo in BMP encoder.", 1 },';
|
||||
echo '+ { "Dmitry Timoshkov", "windowscodecs: Implement IWICBitmapEncoderInfo::GetFileExtensions.", 1 },';
|
||||
@ -7222,6 +7224,8 @@ if test "$enable_windowscodecs_GIF_Encoder" -eq 1; then
|
||||
echo '+ { "Dmitry Timoshkov", "windowscodecs: Implement IWICBitmapEncoder::GetEncoderInfo in TIFF encoder.", 1 },';
|
||||
echo '+ { "Dmitry Timoshkov", "windowscodecs: Avoid crashing if no IPropertyBag2 was passed to IWICBitmapEncoder::CreateNewFrame in TIFF encoder.", 1 },';
|
||||
echo '+ { "Dmitry Timoshkov", "windowscodecs: Add initial implementation of the GIF encoder.", 1 },';
|
||||
echo '+ { "Dmitry Timoshkov", "gdiplus: Fix a typo in GIF container format passed to encode_image_wic().", 1 },';
|
||||
echo '+ { "Dmitry Timoshkov", "windowscodecs: Initialize empty property bag in GIF encoder'\''s CreateNewFrame implementation.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
@ -0,0 +1,35 @@
|
||||
From bddc58a7a0c3bb53e46f107449c776b86e34aa80 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Mon, 17 Oct 2016 15:23:39 +0800
|
||||
Subject: gdiplus: Fix a typo in GIF container format passed to
|
||||
encode_image_wic().
|
||||
|
||||
---
|
||||
dlls/gdiplus/image.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
|
||||
index 74fad29..af87236 100644
|
||||
--- a/dlls/gdiplus/image.c
|
||||
+++ b/dlls/gdiplus/image.c
|
||||
@@ -4512,7 +4512,7 @@ static GpStatus encode_image_jpeg(GpImage *image, IStream* stream,
|
||||
static GpStatus encode_image_gif(GpImage *image, IStream* stream,
|
||||
GDIPCONST CLSID* clsid, GDIPCONST EncoderParameters* params)
|
||||
{
|
||||
- return encode_image_wic(image, stream, &CLSID_WICGifEncoder, params);
|
||||
+ return encode_image_wic(image, stream, &GUID_ContainerFormatGif, params);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -4525,7 +4525,7 @@ GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage *image, IStream* stream,
|
||||
encode_image_func encode_image;
|
||||
int i;
|
||||
|
||||
- TRACE("%p %p %p %p\n", image, stream, clsid, params);
|
||||
+ TRACE("%p %p %s %p\n", image, stream, wine_dbgstr_guid(clsid), params);
|
||||
|
||||
if(!image || !stream)
|
||||
return InvalidParameter;
|
||||
--
|
||||
2.9.0
|
||||
|
@ -0,0 +1,70 @@
|
||||
From b71e5960bb9cc8926ab03d7c2abf70ad976f9732 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Mon, 17 Oct 2016 15:27:47 +0800
|
||||
Subject: windowscodecs: Initialize empty property bag in GIF encoder's
|
||||
CreateNewFrame implementation.
|
||||
|
||||
gdiplus depends on IPropertyBag2 being initialized, otherwise it crashes.
|
||||
---
|
||||
dlls/gdiplus/tests/image.c | 14 ++++++--------
|
||||
dlls/windowscodecs/gifformat.c | 10 ++++++++++
|
||||
2 files changed, 16 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
|
||||
index 8c123b9..8cbbb5b 100644
|
||||
--- a/dlls/gdiplus/tests/image.c
|
||||
+++ b/dlls/gdiplus/tests/image.c
|
||||
@@ -4637,14 +4637,13 @@ static void test_supported_encoders(void)
|
||||
{
|
||||
LPCWSTR mime;
|
||||
const GUID *format;
|
||||
- BOOL todo;
|
||||
} td[] =
|
||||
{
|
||||
- { bmp_mimetype, &ImageFormatBMP, FALSE },
|
||||
- { jpeg_mimetype, &ImageFormatJPEG, FALSE },
|
||||
- { gif_mimetype, &ImageFormatGIF, TRUE },
|
||||
- { tiff_mimetype, &ImageFormatTIFF, FALSE },
|
||||
- { png_mimetype, &ImageFormatPNG, FALSE }
|
||||
+ { bmp_mimetype, &ImageFormatBMP },
|
||||
+ { jpeg_mimetype, &ImageFormatJPEG },
|
||||
+ { gif_mimetype, &ImageFormatGIF },
|
||||
+ { tiff_mimetype, &ImageFormatTIFF },
|
||||
+ { png_mimetype, &ImageFormatPNG }
|
||||
};
|
||||
GUID format, clsid;
|
||||
BOOL ret;
|
||||
@@ -4670,8 +4669,7 @@ static void test_supported_encoders(void)
|
||||
ok(hr == S_OK, "CreateStreamOnHGlobal error %#x\n", hr);
|
||||
|
||||
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);
|
||||
}
|
||||
diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c
|
||||
index b5c56aa..6052726 100644
|
||||
--- a/dlls/windowscodecs/gifformat.c
|
||||
+++ b/dlls/windowscodecs/gifformat.c
|
||||
@@ -2296,6 +2296,16 @@ static HRESULT WINAPI GifEncoder_CreateNewFrame(IWICBitmapEncoder *iface, IWICBi
|
||||
*frame = &ret->IWICBitmapFrameEncode_iface;
|
||||
|
||||
hr = S_OK;
|
||||
+
|
||||
+ if (options)
|
||||
+ {
|
||||
+ hr = CreatePropertyBag2(NULL, 0, options);
|
||||
+ if (hr != S_OK)
|
||||
+ {
|
||||
+ IWICBitmapFrameEncode_Release(*frame);
|
||||
+ *frame = NULL;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
else
|
||||
hr = E_OUTOFMEMORY;
|
||||
--
|
||||
2.9.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user