Author: akhaldi
Date: Thu Apr 24 12:12:56 2014
New Revision: 62936
URL:
http://svn.reactos.org/svn/reactos?rev=62936&view=rev
Log:
[WINDOWSCODECS]
* Sync with Wine 1.7.17.
CORE-8080
Modified:
trunk/reactos/dll/win32/windowscodecs/bitmap.c
trunk/reactos/dll/win32/windowscodecs/bmpdecode.c
trunk/reactos/dll/win32/windowscodecs/bmpencode.c
trunk/reactos/dll/win32/windowscodecs/clsfactory.c
trunk/reactos/dll/win32/windowscodecs/converter.c
trunk/reactos/dll/win32/windowscodecs/gifformat.c
trunk/reactos/dll/win32/windowscodecs/guid.c
trunk/reactos/dll/win32/windowscodecs/icnsformat.c
trunk/reactos/dll/win32/windowscodecs/icoformat.c
trunk/reactos/dll/win32/windowscodecs/imgfactory.c
trunk/reactos/dll/win32/windowscodecs/info.c
trunk/reactos/dll/win32/windowscodecs/jpegformat.c
trunk/reactos/dll/win32/windowscodecs/metadatahandler.c
trunk/reactos/dll/win32/windowscodecs/pngformat.c
trunk/reactos/dll/win32/windowscodecs/proxy.c
trunk/reactos/dll/win32/windowscodecs/regsvr.c
trunk/reactos/dll/win32/windowscodecs/tgaformat.c
trunk/reactos/dll/win32/windowscodecs/tiffformat.c
trunk/reactos/dll/win32/windowscodecs/wincodecs_private.h
trunk/reactos/dll/win32/windowscodecs/windowscodecs.spec
trunk/reactos/dll/win32/windowscodecs/windowscodecs_wincodec.idl
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/windowscodecs/bitmap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/bi…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/bitmap.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/bitmap.c [iso-8859-1] Thu Apr 24 12:12:56 2014
@@ -18,9 +18,15 @@
#include "wincodecs_private.h"
+/* WARNING: .NET Media Integration Layer (MIL) directly dereferences
+ * BitmapImpl members and depends on its exact layout.
+ */
typedef struct BitmapImpl {
+ IMILUnknown1 IMILUnknown1_iface;
+ LONG ref;
+ IMILBitmapSource IMILBitmapSource_iface;
IWICBitmap IWICBitmap_iface;
- LONG ref;
+ IMILUnknown2 IMILUnknown2_iface;
IWICPalette *palette;
int palette_set;
LONG lock; /* 0 if not locked, -1 if locked for writing, count if locked for reading
*/
@@ -46,6 +52,21 @@
return CONTAINING_RECORD(iface, BitmapImpl, IWICBitmap_iface);
}
+static inline BitmapImpl *impl_from_IMILBitmapSource(IMILBitmapSource *iface)
+{
+ return CONTAINING_RECORD(iface, BitmapImpl, IMILBitmapSource_iface);
+}
+
+static inline BitmapImpl *impl_from_IMILUnknown1(IMILUnknown1 *iface)
+{
+ return CONTAINING_RECORD(iface, BitmapImpl, IMILUnknown1_iface);
+}
+
+static inline BitmapImpl *impl_from_IMILUnknown2(IMILUnknown2 *iface)
+{
+ return CONTAINING_RECORD(iface, BitmapImpl, IMILUnknown2_iface);
+}
+
static inline BitmapLockImpl *impl_from_IWICBitmapLock(IWICBitmapLock *iface)
{
return CONTAINING_RECORD(iface, BitmapLockImpl, IWICBitmapLock_iface);
@@ -212,6 +233,10 @@
IsEqualIID(&IID_IWICBitmap, iid))
{
*ppv = &This->IWICBitmap_iface;
+ }
+ else if (IsEqualIID(&IID_IMILBitmapSource, iid))
+ {
+ *ppv = &This->IMILBitmapSource_iface;
}
else
{
@@ -431,6 +456,229 @@
BitmapImpl_SetResolution
};
+static HRESULT WINAPI IMILBitmapImpl_QueryInterface(IMILBitmapSource *iface, REFIID iid,
+ void **ppv)
+{
+ BitmapImpl *This = impl_from_IMILBitmapSource(iface);
+ TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
+
+ if (!ppv) return E_INVALIDARG;
+
+ if (IsEqualIID(&IID_IUnknown, iid) ||
+ IsEqualIID(&IID_IMILBitmapSource, iid))
+ {
+ IUnknown_AddRef(&This->IMILBitmapSource_iface);
+ *ppv = &This->IMILBitmapSource_iface;
+ return S_OK;
+ }
+
+ *ppv = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI IMILBitmapImpl_AddRef(IMILBitmapSource *iface)
+{
+ BitmapImpl *This = impl_from_IMILBitmapSource(iface);
+ return IWICBitmap_AddRef(&This->IWICBitmap_iface);
+}
+
+static ULONG WINAPI IMILBitmapImpl_Release(IMILBitmapSource *iface)
+{
+ BitmapImpl *This = impl_from_IMILBitmapSource(iface);
+ return IWICBitmap_Release(&This->IWICBitmap_iface);
+}
+
+static HRESULT WINAPI IMILBitmapImpl_GetSize(IMILBitmapSource *iface,
+ UINT *width, UINT *height)
+{
+ BitmapImpl *This = impl_from_IMILBitmapSource(iface);
+ return IWICBitmap_GetSize(&This->IWICBitmap_iface, width, height);
+}
+
+static const struct
+{
+ const GUID *WIC_format;
+ int enum_format;
+} pixel_fmt_map[] =
+{
+ { &GUID_WICPixelFormatDontCare, 0 },
+ { &GUID_WICPixelFormat1bppIndexed, 1 },
+ { &GUID_WICPixelFormat2bppIndexed, 2 },
+ { &GUID_WICPixelFormat4bppIndexed, 3 },
+ { &GUID_WICPixelFormat8bppIndexed, 4 },
+ { &GUID_WICPixelFormatBlackWhite, 5 },
+ { &GUID_WICPixelFormat2bppGray, 6 },
+ { &GUID_WICPixelFormat4bppGray, 7 },
+ { &GUID_WICPixelFormat8bppGray, 8 },
+ { &GUID_WICPixelFormat16bppBGR555, 9 },
+ { &GUID_WICPixelFormat16bppBGR565, 0x0a },
+ { &GUID_WICPixelFormat16bppGray, 0x0b },
+ { &GUID_WICPixelFormat24bppBGR, 0x0c },
+ { &GUID_WICPixelFormat24bppRGB, 0x0d },
+ { &GUID_WICPixelFormat32bppBGR, 0x0e },
+ { &GUID_WICPixelFormat32bppBGRA, 0x0f },
+ { &GUID_WICPixelFormat32bppPBGRA, 0x10 },
+ { &GUID_WICPixelFormat48bppRGB, 0x15 },
+ { &GUID_WICPixelFormat64bppRGBA, 0x16 },
+ { &GUID_WICPixelFormat64bppPRGBA, 0x17 },
+ { &GUID_WICPixelFormat32bppCMYK, 0x1c }
+};
+
+static HRESULT WINAPI IMILBitmapImpl_GetPixelFormat(IMILBitmapSource *iface,
+ int *format)
+{
+ BitmapImpl *This = impl_from_IMILBitmapSource(iface);
+ int i;
+
+ TRACE("(%p,%p)\n", iface, format);
+
+ if (!format) return E_INVALIDARG;
+
+ *format = 0;
+
+ for (i = 0; i < sizeof(pixel_fmt_map)/sizeof(pixel_fmt_map[0]); i++)
+ {
+ if (IsEqualGUID(pixel_fmt_map[i].WIC_format, &This->pixelformat))
+ {
+ *format = pixel_fmt_map[i].enum_format;
+ break;
+ }
+ }
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IMILBitmapImpl_GetResolution(IMILBitmapSource *iface,
+ double *dpix, double *dpiy)
+{
+ BitmapImpl *This = impl_from_IMILBitmapSource(iface);
+ return IWICBitmap_GetResolution(&This->IWICBitmap_iface, dpix, dpiy);
+}
+
+static HRESULT WINAPI IMILBitmapImpl_CopyPalette(IMILBitmapSource *iface,
+ IWICPalette *palette)
+{
+ BitmapImpl *This = impl_from_IMILBitmapSource(iface);
+ return IWICBitmap_CopyPalette(&This->IWICBitmap_iface, palette);
+}
+
+static HRESULT WINAPI IMILBitmapImpl_CopyPixels(IMILBitmapSource *iface,
+ const WICRect *rc, UINT stride, UINT size, BYTE *buffer)
+{
+ BitmapImpl *This = impl_from_IMILBitmapSource(iface);
+ return IWICBitmap_CopyPixels(&This->IWICBitmap_iface, rc, stride, size,
buffer);
+}
+
+static HRESULT WINAPI IMILBitmapImpl_UnknownMethod1(IMILBitmapSource *iface, void **ppv)
+{
+ BitmapImpl *This = impl_from_IMILBitmapSource(iface);
+
+ TRACE("(%p,%p)\n", iface, ppv);
+
+ if (!ppv) return E_INVALIDARG;
+
+ IUnknown_AddRef(&This->IMILUnknown1_iface);
+ *ppv = &This->IMILUnknown1_iface;
+
+ return S_OK;
+}
+
+static const IMILBitmapSourceVtbl IMILBitmapImpl_Vtbl =
+{
+ IMILBitmapImpl_QueryInterface,
+ IMILBitmapImpl_AddRef,
+ IMILBitmapImpl_Release,
+ IMILBitmapImpl_GetSize,
+ IMILBitmapImpl_GetPixelFormat,
+ IMILBitmapImpl_GetResolution,
+ IMILBitmapImpl_CopyPalette,
+ IMILBitmapImpl_CopyPixels,
+ IMILBitmapImpl_UnknownMethod1,
+};
+
+static HRESULT WINAPI IMILUnknown1Impl_QueryInterface(IMILUnknown1 *iface, REFIID iid,
+ void **ppv)
+{
+ BitmapImpl *This = impl_from_IMILUnknown1(iface);
+
+ TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
+
+ if (!ppv) return E_INVALIDARG;
+
+ if (IsEqualIID(&IID_IUnknown, iid))
+ {
+ IUnknown_AddRef(&This->IMILUnknown1_iface);
+ *ppv = iface;
+ return S_OK;
+ }
+
+ return IWICBitmap_QueryInterface(&This->IWICBitmap_iface, iid, ppv);
+}
+
+static ULONG WINAPI IMILUnknown1Impl_AddRef(IMILUnknown1 *iface)
+{
+ BitmapImpl *This = impl_from_IMILUnknown1(iface);
+ return IWICBitmap_AddRef(&This->IWICBitmap_iface);
+}
+
+static ULONG WINAPI IMILUnknown1Impl_Release(IMILUnknown1 *iface)
+{
+ BitmapImpl *This = impl_from_IMILUnknown1(iface);
+ return IWICBitmap_Release(&This->IWICBitmap_iface);
+}
+
+static const IMILUnknown1Vtbl IMILUnknown1Impl_Vtbl =
+{
+ IMILUnknown1Impl_QueryInterface,
+ IMILUnknown1Impl_AddRef,
+ IMILUnknown1Impl_Release,
+};
+
+static HRESULT WINAPI IMILUnknown2Impl_QueryInterface(IMILUnknown2 *iface, REFIID iid,
+ void **ppv)
+{
+ BitmapImpl *This = impl_from_IMILUnknown2(iface);
+
+ TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
+
+ if (!ppv) return E_INVALIDARG;
+
+ if (IsEqualIID(&IID_IUnknown, iid))
+ {
+ IUnknown_AddRef(&This->IMILUnknown2_iface);
+ *ppv = iface;
+ return S_OK;
+ }
+
+ return IWICBitmap_QueryInterface(&This->IWICBitmap_iface, iid, ppv);
+}
+
+static ULONG WINAPI IMILUnknown2Impl_AddRef(IMILUnknown2 *iface)
+{
+ BitmapImpl *This = impl_from_IMILUnknown2(iface);
+ return IWICBitmap_AddRef(&This->IWICBitmap_iface);
+}
+
+static ULONG WINAPI IMILUnknown2Impl_Release(IMILUnknown2 *iface)
+{
+ BitmapImpl *This = impl_from_IMILUnknown2(iface);
+ return IWICBitmap_Release(&This->IWICBitmap_iface);
+}
+
+static HRESULT WINAPI IMILUnknown2Impl_UnknownMethod1(IMILUnknown2 *iface, void *arg1,
void *arg2)
+{
+ FIXME("(%p,%p,%p): stub\n", iface, arg1, arg2);
+ return E_NOTIMPL;
+}
+
+static const IMILUnknown2Vtbl IMILUnknown2Impl_Vtbl =
+{
+ IMILUnknown2Impl_QueryInterface,
+ IMILUnknown2Impl_AddRef,
+ IMILUnknown2Impl_Release,
+ IMILUnknown2Impl_UnknownMethod1,
+};
+
HRESULT BitmapImpl_Create(UINT uiWidth, UINT uiHeight,
UINT stride, UINT datasize, BYTE *bits,
REFWICPixelFormatGUID pixelFormat, WICBitmapCreateCacheOption option,
@@ -461,6 +709,9 @@
if (bits) memcpy(data, bits, datasize);
This->IWICBitmap_iface.lpVtbl = &BitmapImpl_Vtbl;
+ This->IMILBitmapSource_iface.lpVtbl = &IMILBitmapImpl_Vtbl;
+ This->IMILUnknown1_iface.lpVtbl = &IMILUnknown1Impl_Vtbl;
+ This->IMILUnknown2_iface.lpVtbl = &IMILUnknown2Impl_Vtbl;
This->ref = 1;
This->palette = NULL;
This->palette_set = 0;
Modified: trunk/reactos/dll/win32/windowscodecs/bmpdecode.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/bm…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/bmpdecode.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/bmpdecode.c [iso-8859-1] Thu Apr 24 12:12:56
2014
@@ -1169,16 +1169,14 @@
return S_OK;
}
-static HRESULT BmpDecoder_Construct(int packed, int icoframe, IUnknown *pUnkOuter, REFIID
iid, void** ppv)
+static HRESULT BmpDecoder_Construct(int packed, int icoframe, REFIID iid, void** ppv)
{
BmpDecoder *This;
HRESULT ret;
- TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
+ TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
*ppv = NULL;
-
- if (pUnkOuter) return CLASS_E_NOAGGREGATION;
ret = BmpDecoder_Create(packed, icoframe, &This);
if (FAILED(ret)) return ret;
@@ -1189,14 +1187,14 @@
return ret;
}
-HRESULT BmpDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
-{
- return BmpDecoder_Construct(FALSE, FALSE, pUnkOuter, iid, ppv);
-}
-
-HRESULT DibDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
-{
- return BmpDecoder_Construct(TRUE, FALSE, pUnkOuter, iid, ppv);
+HRESULT BmpDecoder_CreateInstance(REFIID iid, void** ppv)
+{
+ return BmpDecoder_Construct(FALSE, FALSE, iid, ppv);
+}
+
+HRESULT DibDecoder_CreateInstance(REFIID iid, void** ppv)
+{
+ return BmpDecoder_Construct(TRUE, FALSE, iid, ppv);
}
HRESULT IcoDibDecoder_CreateInstance(BmpDecoder **ppDecoder)
Modified: trunk/reactos/dll/win32/windowscodecs/bmpencode.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/bm…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/bmpencode.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/bmpencode.c [iso-8859-1] Thu Apr 24 12:12:56
2014
@@ -586,16 +586,14 @@
BmpEncoder_GetMetadataQueryWriter
};
-HRESULT BmpEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT BmpEncoder_CreateInstance(REFIID iid, void** ppv)
{
BmpEncoder *This;
HRESULT ret;
- TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
+ TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
*ppv = NULL;
-
- if (pUnkOuter) return CLASS_E_NOAGGREGATION;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(BmpEncoder));
if (!This) return E_OUTOFMEMORY;
Modified: trunk/reactos/dll/win32/windowscodecs/clsfactory.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/cl…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/clsfactory.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/clsfactory.c [iso-8859-1] Thu Apr 24 12:12:56
2014
@@ -22,7 +22,7 @@
typedef struct {
REFCLSID classid;
- HRESULT (*constructor)(IUnknown*,REFIID,void**);
+ HRESULT (*constructor)(REFIID,void**);
} classinfo;
static const classinfo wic_classes[] = {
@@ -112,7 +112,11 @@
{
ClassFactoryImpl *This = impl_from_IClassFactory(iface);
- return This->info->constructor(pUnkOuter, riid, ppv);
+ *ppv = NULL;
+
+ if (pUnkOuter) return CLASS_E_NOAGGREGATION;
+
+ return This->info->constructor(riid, ppv);
}
static HRESULT WINAPI ClassFactoryImpl_LockServer(IClassFactory *iface, BOOL lock)
Modified: trunk/reactos/dll/win32/windowscodecs/converter.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/co…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/converter.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/converter.c [iso-8859-1] Thu Apr 24 12:12:56
2014
@@ -1256,16 +1256,14 @@
FormatConverter_CanConvert
};
-HRESULT FormatConverter_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT FormatConverter_CreateInstance(REFIID iid, void** ppv)
{
FormatConverter *This;
HRESULT ret;
- TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
+ TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
*ppv = NULL;
-
- if (pUnkOuter) return CLASS_E_NOAGGREGATION;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(FormatConverter));
if (!This) return E_OUTOFMEMORY;
Modified: trunk/reactos/dll/win32/windowscodecs/gifformat.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/gi…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/gifformat.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/gifformat.c [iso-8859-1] Thu Apr 24 12:12:56
2014
@@ -129,9 +129,9 @@
load_LSD_metadata
};
-HRESULT LSDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv)
-{
- return MetadataReader_Create(&LSDReader_Vtbl, pUnkOuter, iid, ppv);
+HRESULT LSDReader_CreateInstance(REFIID iid, void **ppv)
+{
+ return MetadataReader_Create(&LSDReader_Vtbl, iid, ppv);
}
#include "pshpack1.h"
@@ -227,9 +227,9 @@
load_IMD_metadata
};
-HRESULT IMDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv)
-{
- return MetadataReader_Create(&IMDReader_Vtbl, pUnkOuter, iid, ppv);
+HRESULT IMDReader_CreateInstance(REFIID iid, void **ppv)
+{
+ return MetadataReader_Create(&IMDReader_Vtbl, iid, ppv);
}
static HRESULT load_GCE_metadata(IStream *stream, const GUID *vendor, DWORD options,
@@ -305,9 +305,9 @@
load_GCE_metadata
};
-HRESULT GCEReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv)
-{
- return MetadataReader_Create(&GCEReader_Vtbl, pUnkOuter, iid, ppv);
+HRESULT GCEReader_CreateInstance(REFIID iid, void **ppv)
+{
+ return MetadataReader_Create(&GCEReader_Vtbl, iid, ppv);
}
static HRESULT load_APE_metadata(IStream *stream, const GUID *vendor, DWORD options,
@@ -412,9 +412,9 @@
load_APE_metadata
};
-HRESULT APEReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv)
-{
- return MetadataReader_Create(&APEReader_Vtbl, pUnkOuter, iid, ppv);
+HRESULT APEReader_CreateInstance(REFIID iid, void **ppv)
+{
+ return MetadataReader_Create(&APEReader_Vtbl, iid, ppv);
}
static HRESULT load_GifComment_metadata(IStream *stream, const GUID *vendor, DWORD
options,
@@ -506,9 +506,9 @@
load_GifComment_metadata
};
-HRESULT GifCommentReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv)
-{
- return MetadataReader_Create(&GifCommentReader_Vtbl, pUnkOuter, iid, ppv);
+HRESULT GifCommentReader_CreateInstance(REFIID iid, void **ppv)
+{
+ return MetadataReader_Create(&GifCommentReader_Vtbl, iid, ppv);
}
static IStream *create_stream(const void *data, int data_size)
@@ -1079,7 +1079,7 @@
}
hr = IStream_Read(stream, data, len, &bytesread);
- if (hr != S_OK) bytesread = 0;
+ if (FAILED(hr)) bytesread = 0;
return bytesread;
}
@@ -1402,16 +1402,14 @@
GifDecoder_Block_GetEnumerator
};
-HRESULT GifDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT GifDecoder_CreateInstance(REFIID iid, void** ppv)
{
GifDecoder *This;
HRESULT ret;
- TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
+ TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
*ppv = NULL;
-
- if (pUnkOuter) return CLASS_E_NOAGGREGATION;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(GifDecoder));
if (!This) return E_OUTOFMEMORY;
Modified: trunk/reactos/dll/win32/windowscodecs/guid.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/gu…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/guid.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/guid.c [iso-8859-1] Thu Apr 24 12:12:56 2014
@@ -16,5 +16,6 @@
DEFINE_GUID(CLSID_WICIcnsEncoder,
0x312fb6f1,0xb767,0x409d,0x8a,0x6d,0x0f,0xc1,0x54,0xd4,0xf0,0x5c);
DEFINE_GUID(GUID_WineContainerFormatTga,
0x0c44fda1,0xa5c5,0x4298,0x96,0x85,0x47,0x3f,0xc1,0x7c,0xd3,0x22);
DEFINE_GUID(GUID_VendorWine,
0xddf46da1,0x7dc1,0x404e,0x98,0xf2,0xef,0xa4,0x8d,0xfc,0x95,0x0a);
+DEFINE_GUID(IID_IMILBitmapSource,0x7543696a,0xbc8d,0x46b0,0x5f,0x81,0x8d,0x95,0x72,0x89,0x72,0xbe);
/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */
Modified: trunk/reactos/dll/win32/windowscodecs/icnsformat.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/ic…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/icnsformat.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/icnsformat.c [iso-8859-1] Thu Apr 24 12:12:56
2014
@@ -730,16 +730,14 @@
IcnsEncoder_GetMetadataQueryWriter
};
-HRESULT IcnsEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT IcnsEncoder_CreateInstance(REFIID iid, void** ppv)
{
IcnsEncoder *This;
HRESULT ret;
- TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
+ TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
*ppv = NULL;
-
- if (pUnkOuter) return CLASS_E_NOAGGREGATION;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(IcnsEncoder));
if (!This) return E_OUTOFMEMORY;
@@ -763,7 +761,7 @@
#else /* !defined(HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H) ||
MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4 */
-HRESULT IcnsEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT IcnsEncoder_CreateInstance(REFIID iid, void** ppv)
{
ERR("Trying to save ICNS picture, but ICNS support is not compiled
in.\n");
return E_FAIL;
Modified: trunk/reactos/dll/win32/windowscodecs/icoformat.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/ic…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/icoformat.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/icoformat.c [iso-8859-1] Thu Apr 24 12:12:56
2014
@@ -216,7 +216,7 @@
IWICBitmapFrameDecode *framedecode;
WICPixelFormatGUID pixelformat;
IWICBitmapSource *source;
- int has_alpha=FALSE; /* if TRUE, alpha data might be in the image data */
+ BOOL has_alpha=FALSE; /* if TRUE, alpha data might be in the image data */
WICRect rc;
hr = IcoDibDecoder_CreateInstance(&bmp_decoder);
@@ -381,7 +381,7 @@
WICRect rect;
HRESULT hr;
- hr = PngDecoder_CreateInstance(NULL, &IID_IWICBitmapDecoder,
(void**)&decoder);
+ hr = PngDecoder_CreateInstance(&IID_IWICBitmapDecoder, (void**)&decoder);
if (FAILED(hr))
goto end;
hr = IWICBitmapDecoder_Initialize(decoder, stream, WICDecodeMetadataCacheOnLoad);
@@ -722,16 +722,14 @@
IcoDecoder_GetFrame
};
-HRESULT IcoDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT IcoDecoder_CreateInstance(REFIID iid, void** ppv)
{
IcoDecoder *This;
HRESULT ret;
- TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
+ TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
*ppv = NULL;
-
- if (pUnkOuter) return CLASS_E_NOAGGREGATION;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(IcoDecoder));
if (!This) return E_OUTOFMEMORY;
Modified: trunk/reactos/dll/win32/windowscodecs/imgfactory.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/im…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/imgfactory.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/imgfactory.c [iso-8859-1] Thu Apr 24 12:12:56
2014
@@ -405,7 +405,7 @@
static HRESULT WINAPI ComponentFactory_CreateFormatConverter(IWICComponentFactory
*iface,
IWICFormatConverter **ppIFormatConverter)
{
- return FormatConverter_CreateInstance(NULL, &IID_IWICFormatConverter,
(void**)ppIFormatConverter);
+ return FormatConverter_CreateInstance(&IID_IWICFormatConverter,
(void**)ppIFormatConverter);
}
static HRESULT WINAPI ComponentFactory_CreateBitmapScaler(IWICComponentFactory *iface,
@@ -585,12 +585,166 @@
return BitmapImpl_Create(width, height, stride, size, buffer, format,
WICBitmapCacheOnLoad, bitmap);
}
+static BOOL get_16bpp_format(HBITMAP hbm, WICPixelFormatGUID *format)
+{
+ BOOL ret = TRUE;
+ BITMAPV4HEADER bmh;
+ HDC hdc;
+
+ hdc = CreateCompatibleDC(0);
+
+ memset(&bmh, 0, sizeof(bmh));
+ bmh.bV4Size = sizeof(bmh);
+ bmh.bV4Width = 1;
+ bmh.bV4Height = 1;
+ bmh.bV4V4Compression = BI_BITFIELDS;
+ bmh.bV4BitCount = 16;
+
+ GetDIBits(hdc, hbm, 0, 0, NULL, (BITMAPINFO *)&bmh, DIB_RGB_COLORS);
+
+ if (bmh.bV4RedMask == 0x7c00 &&
+ bmh.bV4GreenMask == 0x3e0 &&
+ bmh.bV4BlueMask == 0x1f)
+ {
+ *format = GUID_WICPixelFormat16bppBGR555;
+ }
+ else if (bmh.bV4RedMask == 0xf800 &&
+ bmh.bV4GreenMask == 0x7e0 &&
+ bmh.bV4BlueMask == 0x1f)
+ {
+ *format = GUID_WICPixelFormat16bppBGR565;
+ }
+ else
+ {
+ FIXME("unrecognized bitfields %x,%x,%x\n", bmh.bV4RedMask,
+ bmh.bV4GreenMask, bmh.bV4BlueMask);
+ ret = FALSE;
+ }
+
+ DeleteDC(hdc);
+ return ret;
+}
+
static HRESULT WINAPI ComponentFactory_CreateBitmapFromHBITMAP(IWICComponentFactory
*iface,
- HBITMAP hBitmap, HPALETTE hPalette, WICBitmapAlphaChannelOption options,
- IWICBitmap **ppIBitmap)
-{
- FIXME("(%p,%p,%p,%u,%p): stub\n", iface, hBitmap, hPalette, options,
ppIBitmap);
- return E_NOTIMPL;
+ HBITMAP hbm, HPALETTE hpal, WICBitmapAlphaChannelOption option, IWICBitmap **bitmap)
+{
+ BITMAP bm;
+ HRESULT hr;
+ WICPixelFormatGUID format;
+ IWICBitmapLock *lock;
+ UINT size, num_palette_entries = 0;
+ PALETTEENTRY entry[256];
+
+ TRACE("(%p,%p,%p,%u,%p)\n", iface, hbm, hpal, option, bitmap);
+
+ if (!bitmap) return E_INVALIDARG;
+
+ if (GetObjectW(hbm, sizeof(bm), &bm) != sizeof(bm))
+ return WINCODEC_ERR_WIN32ERROR;
+
+ if (hpal)
+ {
+ num_palette_entries = GetPaletteEntries(hpal, 0, 256, entry);
+ if (!num_palette_entries)
+ return WINCODEC_ERR_WIN32ERROR;
+ }
+
+ /* TODO: Figure out the correct format for 16, 32, 64 bpp */
+ switch(bm.bmBitsPixel)
+ {
+ case 1:
+ format = GUID_WICPixelFormat1bppIndexed;
+ break;
+ case 4:
+ format = GUID_WICPixelFormat4bppIndexed;
+ break;
+ case 8:
+ format = GUID_WICPixelFormat8bppIndexed;
+ break;
+ case 16:
+ if (!get_16bpp_format(hbm, &format))
+ return E_INVALIDARG;
+ break;
+ case 24:
+ format = GUID_WICPixelFormat24bppBGR;
+ break;
+ case 32:
+ switch (option)
+ {
+ case WICBitmapUseAlpha:
+ format = GUID_WICPixelFormat32bppBGRA;
+ break;
+ case WICBitmapUsePremultipliedAlpha:
+ format = GUID_WICPixelFormat32bppPBGRA;
+ break;
+ case WICBitmapIgnoreAlpha:
+ format = GUID_WICPixelFormat32bppBGR;
+ break;
+ default:
+ return E_INVALIDARG;
+ }
+ break;
+ case 48:
+ format = GUID_WICPixelFormat48bppRGB;
+ break;
+ default:
+ FIXME("unsupported %d bpp\n", bm.bmBitsPixel);
+ return E_INVALIDARG;
+ }
+
+ hr = BitmapImpl_Create(bm.bmWidth, bm.bmHeight, bm.bmWidthBytes, 0, NULL,
&format, option, bitmap);
+ if (hr != S_OK) return hr;
+
+ hr = IWICBitmap_Lock(*bitmap, NULL, WICBitmapLockWrite, &lock);
+ if (hr == S_OK)
+ {
+ BYTE *buffer;
+ HDC hdc;
+ char bmibuf[FIELD_OFFSET(BITMAPINFO, bmiColors) + 256 * sizeof(RGBQUAD)];
+ BITMAPINFO *bmi = (BITMAPINFO *)bmibuf;
+
+ IWICBitmapLock_GetDataPointer(lock, &size, &buffer);
+
+ hdc = CreateCompatibleDC(0);
+
+ bmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+ bmi->bmiHeader.biBitCount = 0;
+ GetDIBits(hdc, hbm, 0, 0, NULL, bmi, DIB_RGB_COLORS);
+ bmi->bmiHeader.biHeight = -bm.bmHeight;
+ GetDIBits(hdc, hbm, 0, bm.bmHeight, buffer, bmi, DIB_RGB_COLORS);
+
+ DeleteDC(hdc);
+ IWICBitmapLock_Release(lock);
+
+ if (num_palette_entries)
+ {
+ IWICPalette *palette;
+ WICColor colors[256];
+ UINT i;
+
+ hr = PaletteImpl_Create(&palette);
+ if (hr == S_OK)
+ {
+ for (i = 0; i < num_palette_entries; i++)
+ colors[i] = 0xff000000 | entry[i].peRed << 16 |
+ entry[i].peGreen << 8 | entry[i].peBlue;
+
+ hr = IWICPalette_InitializeCustom(palette, colors, num_palette_entries);
+ if (hr == S_OK)
+ hr = IWICBitmap_SetPalette(*bitmap, palette);
+
+ IWICPalette_Release(palette);
+ }
+ }
+ }
+
+ if (hr != S_OK)
+ {
+ IWICBitmap_Release(*bitmap);
+ *bitmap = NULL;
+ }
+
+ return hr;
}
static HRESULT WINAPI ComponentFactory_CreateBitmapFromHICON(IWICComponentFactory
*iface,
@@ -860,16 +1014,14 @@
ComponentFactory_CreateEncoderPropertyBag
};
-HRESULT ComponentFactory_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT ComponentFactory_CreateInstance(REFIID iid, void** ppv)
{
ComponentFactory *This;
HRESULT ret;
- TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
+ TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
*ppv = NULL;
-
- if (pUnkOuter) return CLASS_E_NOAGGREGATION;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(ComponentFactory));
if (!This) return E_OUTOFMEMORY;
Modified: trunk/reactos/dll/win32/windowscodecs/info.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/in…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/info.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/info.c [iso-8859-1] Thu Apr 24 12:12:56 2014
@@ -1754,7 +1754,7 @@
WCHAR guidstring[39];
LONG res;
const struct category *category;
- int found=0;
+ BOOL found = FALSE;
HRESULT hr;
res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, KEY_READ, &clsidkey);
@@ -1775,7 +1775,7 @@
if (res == ERROR_SUCCESS)
{
RegCloseKey(classkey);
- found = 1;
+ found = TRUE;
}
RegCloseKey(instancekey);
}
Modified: trunk/reactos/dll/win32/windowscodecs/jpegformat.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/jp…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/jpegformat.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/jpegformat.c [iso-8859-1] Thu Apr 24 12:12:56
2014
@@ -231,7 +231,7 @@
hr = IStream_Read(This->stream, This->source_buffer, 1024, &bytesread);
- if (hr != S_OK || bytesread == 0)
+ if (FAILED(hr) || bytesread == 0)
{
return FALSE;
}
@@ -696,12 +696,12 @@
JpegDecoder_Frame_GetThumbnail
};
-HRESULT JpegDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT JpegDecoder_CreateInstance(REFIID iid, void** ppv)
{
JpegDecoder *This;
HRESULT ret;
- TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
+ TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
if (!libjpeg_handle && !load_libjpeg())
{
@@ -710,8 +710,6 @@
}
*ppv = NULL;
-
- if (pUnkOuter) return CLASS_E_NOAGGREGATION;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(JpegDecoder));
if (!This) return E_OUTOFMEMORY;
@@ -754,13 +752,13 @@
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
struct jpeg_destination_mgr dest_mgr;
- int initialized;
+ BOOL initialized;
int frame_count;
- int frame_initialized;
- int started_compress;
+ BOOL frame_initialized;
+ BOOL started_compress;
int lines_written;
- int frame_committed;
- int committed;
+ BOOL frame_committed;
+ BOOL committed;
UINT width, height;
double xres, yres;
const jpeg_compress_format *format;
@@ -1031,7 +1029,7 @@
pjpeg_start_compress(&This->cinfo, TRUE);
- This->started_compress = 1;
+ This->started_compress = TRUE;
}
row_size = This->format->bpp / 8 * This->width;
@@ -1438,16 +1436,14 @@
JpegEncoder_GetMetadataQueryWriter
};
-HRESULT JpegEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT JpegEncoder_CreateInstance(REFIID iid, void** ppv)
{
JpegEncoder *This;
HRESULT ret;
- TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
+ TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
*ppv = NULL;
-
- if (pUnkOuter) return CLASS_E_NOAGGREGATION;
if (!libjpeg_handle && !load_libjpeg())
{
@@ -1461,13 +1457,13 @@
This->IWICBitmapEncoder_iface.lpVtbl = &JpegEncoder_Vtbl;
This->IWICBitmapFrameEncode_iface.lpVtbl = &JpegEncoder_FrameVtbl;
This->ref = 1;
- This->initialized = 0;
+ This->initialized = FALSE;
This->frame_count = 0;
- This->frame_initialized = 0;
- This->started_compress = 0;
+ This->frame_initialized = FALSE;
+ This->started_compress = FALSE;
This->lines_written = 0;
- This->frame_committed = 0;
- This->committed = 0;
+ This->frame_committed = FALSE;
+ This->committed = FALSE;
This->width = This->height = 0;
This->xres = This->yres = 0.0;
This->format = NULL;
@@ -1483,13 +1479,13 @@
#else /* !defined(SONAME_LIBJPEG) */
-HRESULT JpegDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT JpegDecoder_CreateInstance(REFIID iid, void** ppv)
{
ERR("Trying to load JPEG picture, but JPEG support is not compiled
in.\n");
return E_FAIL;
}
-HRESULT JpegEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT JpegEncoder_CreateInstance(REFIID iid, void** ppv)
{
ERR("Trying to save JPEG picture, but JPEG support is not compiled
in.\n");
return E_FAIL;
Modified: trunk/reactos/dll/win32/windowscodecs/metadatahandler.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/me…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/metadatahandler.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/metadatahandler.c [iso-8859-1] Thu Apr 24
12:12:56 2014
@@ -440,7 +440,7 @@
MetadataHandler_SaveEx
};
-HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown *pUnkOuter,
REFIID iid, void** ppv)
+HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, REFIID iid, void** ppv)
{
MetadataHandler *This;
HRESULT hr;
@@ -448,8 +448,6 @@
TRACE("%s\n", debugstr_guid(vtable->clsid));
*ppv = NULL;
-
- if (pUnkOuter) return CLASS_E_NOAGGREGATION;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataHandler));
if (!This) return E_OUTOFMEMORY;
@@ -709,9 +707,9 @@
LoadUnknownMetadata
};
-HRESULT UnknownMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void**
ppv)
-{
- return MetadataReader_Create(&UnknownMetadataReader_Vtbl, pUnkOuter, iid, ppv);
+HRESULT UnknownMetadataReader_CreateInstance(REFIID iid, void** ppv)
+{
+ return MetadataReader_Create(&UnknownMetadataReader_Vtbl, iid, ppv);
}
#define SWAP_USHORT(x) do { if (!native_byte_order) (x) = RtlUshortByteSwap(x); }
while(0)
@@ -1144,7 +1142,7 @@
LoadIfdMetadata
};
-HRESULT IfdMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv)
-{
- return MetadataReader_Create(&IfdMetadataReader_Vtbl, pUnkOuter, iid, ppv);
-}
+HRESULT IfdMetadataReader_CreateInstance(REFIID iid, void **ppv)
+{
+ return MetadataReader_Create(&IfdMetadataReader_Vtbl, iid, ppv);
+}
Modified: trunk/reactos/dll/win32/windowscodecs/pngformat.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/pn…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/pngformat.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/pngformat.c [iso-8859-1] Thu Apr 24 12:12:56
2014
@@ -129,9 +129,9 @@
LoadTextMetadata
};
-HRESULT PngTextReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
-{
- return MetadataReader_Create(&TextReader_Vtbl, pUnkOuter, iid, ppv);
+HRESULT PngTextReader_CreateInstance(REFIID iid, void** ppv)
+{
+ return MetadataReader_Create(&TextReader_Vtbl, iid, ppv);
}
#ifdef SONAME_LIBPNG
@@ -935,7 +935,9 @@
static HRESULT WINAPI PngDecoder_Block_GetCount(IWICMetadataBlockReader *iface,
UINT *pcCount)
{
- FIXME("%p,%p: stub\n", iface, pcCount);
+ static int once;
+ TRACE("%p,%p\n", iface, pcCount);
+ if (!once++) FIXME("stub\n");
return E_NOTIMPL;
}
@@ -963,16 +965,14 @@
PngDecoder_Block_GetEnumerator,
};
-HRESULT PngDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT PngDecoder_CreateInstance(REFIID iid, void** ppv)
{
PngDecoder *This;
HRESULT ret;
- TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
+ TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
*ppv = NULL;
-
- if (pUnkOuter) return CLASS_E_NOAGGREGATION;
if (!libpng_handle && !load_libpng())
{
@@ -1655,16 +1655,14 @@
PngEncoder_GetMetadataQueryWriter
};
-HRESULT PngEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT PngEncoder_CreateInstance(REFIID iid, void** ppv)
{
PngEncoder *This;
HRESULT ret;
- TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
+ TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
*ppv = NULL;
-
- if (pUnkOuter) return CLASS_E_NOAGGREGATION;
if (!libpng_handle && !load_libpng())
{
@@ -1703,13 +1701,13 @@
#else /* !HAVE_PNG_H */
-HRESULT PngDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT PngDecoder_CreateInstance(REFIID iid, void** ppv)
{
ERR("Trying to load PNG picture, but PNG support is not compiled in.\n");
return E_FAIL;
}
-HRESULT PngEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT PngEncoder_CreateInstance(REFIID iid, void** ppv)
{
ERR("Trying to save PNG picture, but PNG support is not compiled in.\n");
return E_FAIL;
Modified: trunk/reactos/dll/win32/windowscodecs/proxy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/pr…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/proxy.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/proxy.c [iso-8859-1] Thu Apr 24 12:12:56 2014
@@ -20,6 +20,12 @@
#include "wincodecs_private.h"
+HRESULT WINAPI IPropertyBag2_Write_Proxy(IPropertyBag2 *iface,
+ ULONG cProperties, PROPBAG2 *ppropbag, VARIANT *pvarValue)
+{
+ return IPropertyBag2_Write(iface, cProperties, ppropbag, pvarValue);
+}
+
HRESULT WINAPI IWICBitmapClipper_Initialize_Proxy_W(IWICBitmapClipper *iface,
IWICBitmapSource *pISource, const WICRect *prc)
{
@@ -614,5 +620,45 @@
{
TRACE("%x, %p\n", SDKVersion, ppIImagingFactory);
- return ComponentFactory_CreateInstance(NULL, &IID_IWICImagingFactory,
(void**)ppIImagingFactory);
-}
+ return ComponentFactory_CreateInstance(&IID_IWICImagingFactory,
(void**)ppIImagingFactory);
+}
+
+HRESULT WINAPI WICSetEncoderFormat_Proxy(IWICBitmapSource *pSourceIn,
+ IWICPalette *pIPalette, IWICBitmapFrameEncode *pIFrameEncode,
+ IWICBitmapSource **ppSourceOut)
+{
+ HRESULT hr;
+ WICPixelFormatGUID pixelformat, framepixelformat;
+
+ TRACE("%p,%p,%p,%p\n", pSourceIn, pIPalette, pIFrameEncode, ppSourceOut);
+
+ if (pIPalette) FIXME("ignoring palette\n");
+
+ if (!pSourceIn || !pIFrameEncode || !ppSourceOut)
+ return E_INVALIDARG;
+
+ *ppSourceOut = NULL;
+
+ hr = IWICBitmapSource_GetPixelFormat(pSourceIn, &pixelformat);
+
+ if (SUCCEEDED(hr))
+ {
+ framepixelformat = pixelformat;
+ hr = IWICBitmapFrameEncode_SetPixelFormat(pIFrameEncode, &framepixelformat);
+ }
+
+ if (SUCCEEDED(hr))
+ {
+ if (IsEqualGUID(&pixelformat, &framepixelformat))
+ {
+ *ppSourceOut = pSourceIn;
+ IWICBitmapSource_AddRef(pSourceIn);
+ }
+ else
+ {
+ hr = WICConvertBitmapSource(&framepixelformat, pSourceIn, ppSourceOut);
+ }
+ }
+
+ return hr;
+}
Modified: trunk/reactos/dll/win32/windowscodecs/regsvr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/re…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/regsvr.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/regsvr.c [iso-8859-1] Thu Apr 24 12:12:56 2014
@@ -218,21 +218,21 @@
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
if (res == ERROR_SUCCESS) {
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
- (CONST BYTE*)(buf), 78);
+ (const BYTE*)buf, 78);
RegCloseKey(instance_clsid_key);
}
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
if (list->author) {
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->author),
+ (const BYTE*)list->author,
strlen(list->author) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->friendlyname) {
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->friendlyname),
+ (const BYTE*)list->friendlyname,
strlen(list->friendlyname) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
@@ -240,34 +240,34 @@
if (list->vendor) {
StringFromGUID2(list->vendor, buf, 39);
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
- (CONST BYTE*)(buf), 78);
+ (const BYTE*)buf, 78);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->container_format) {
StringFromGUID2(list->container_format, buf, 39);
res = RegSetValueExW(clsid_key, containerformat_valuename, 0, REG_SZ,
- (CONST BYTE*)(buf), 78);
+ (const BYTE*)buf, 78);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->version) {
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->version),
+ (const BYTE*)list->version,
strlen(list->version) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->mimetypes) {
res = RegSetValueExA(clsid_key, mimetypes_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->mimetypes),
+ (const BYTE*)list->mimetypes,
strlen(list->mimetypes) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->extensions) {
res = RegSetValueExA(clsid_key, extensions_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->extensions),
+ (const BYTE*)list->extensions,
strlen(list->extensions) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
@@ -308,10 +308,10 @@
KEY_READ | KEY_WRITE, NULL, &pattern_key,
NULL);
if (res != ERROR_SUCCESS) break;
res = RegSetValueExA(pattern_key, length_valuename, 0, REG_DWORD,
- (CONST BYTE*)(&list->patterns[i].length), 4);
+ (const BYTE*)&list->patterns[i].length, 4);
if (res == ERROR_SUCCESS)
res = RegSetValueExA(pattern_key, position_valuename, 0, REG_DWORD,
- (CONST BYTE*)(&list->patterns[i].position), 4);
+ (const BYTE*)&list->patterns[i].position,
4);
if (res == ERROR_SUCCESS)
res = RegSetValueExA(pattern_key, pattern_valuename, 0, REG_BINARY,
list->patterns[i].pattern,
@@ -322,7 +322,7 @@
list->patterns[i].length);
if (res == ERROR_SUCCESS)
res = RegSetValueExA(pattern_key, endofstream_valuename, 0, REG_DWORD,
- (CONST BYTE*)&(list->patterns[i].endofstream), 4);
+ (const
BYTE*)&list->patterns[i].endofstream, 4);
RegCloseKey(pattern_key);
}
RegCloseKey(patterns_key);
@@ -433,21 +433,21 @@
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
if (res == ERROR_SUCCESS) {
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
- (CONST BYTE*)(buf), 78);
+ (const BYTE*)buf, 78);
RegCloseKey(instance_clsid_key);
}
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
if (list->author) {
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->author),
+ (const BYTE*)list->author,
strlen(list->author) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->friendlyname) {
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->friendlyname),
+ (const BYTE*)list->friendlyname,
strlen(list->friendlyname) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
@@ -455,34 +455,34 @@
if (list->vendor) {
StringFromGUID2(list->vendor, buf, 39);
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
- (CONST BYTE*)(buf), 78);
+ (const BYTE*)buf, 78);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->container_format) {
StringFromGUID2(list->container_format, buf, 39);
res = RegSetValueExW(clsid_key, containerformat_valuename, 0, REG_SZ,
- (CONST BYTE*)(buf), 78);
+ (const BYTE*)buf, 78);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->version) {
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->version),
+ (const BYTE*)list->version,
strlen(list->version) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->mimetypes) {
res = RegSetValueExA(clsid_key, mimetypes_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->mimetypes),
+ (const BYTE*)list->mimetypes,
strlen(list->mimetypes) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->extensions) {
res = RegSetValueExA(clsid_key, extensions_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->extensions),
+ (const BYTE*)list->extensions,
strlen(list->extensions) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
@@ -611,21 +611,21 @@
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
if (res == ERROR_SUCCESS) {
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
- (CONST BYTE*)(buf), 78);
+ (const BYTE*)buf, 78);
RegCloseKey(instance_clsid_key);
}
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
if (list->author) {
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->author),
+ (const BYTE*)list->author,
strlen(list->author) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->friendlyname) {
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->friendlyname),
+ (const BYTE*)list->friendlyname,
strlen(list->friendlyname) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
@@ -633,13 +633,13 @@
if (list->vendor) {
StringFromGUID2(list->vendor, buf, 39);
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
- (CONST BYTE*)(buf), 78);
+ (const BYTE*)buf, 78);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->version) {
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->version),
+ (const BYTE*)list->version,
strlen(list->version) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
@@ -768,21 +768,21 @@
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
if (res == ERROR_SUCCESS) {
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
- (CONST BYTE*)(buf), 78);
+ (const BYTE*)buf, 78);
RegCloseKey(instance_clsid_key);
}
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
if (list->author) {
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->author),
+ (const BYTE*)list->author,
strlen(list->author) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->friendlyname) {
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->friendlyname),
+ (const BYTE*)list->friendlyname,
strlen(list->friendlyname) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
@@ -790,42 +790,42 @@
if (list->vendor) {
StringFromGUID2(list->vendor, buf, 39);
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
- (CONST BYTE*)(buf), 78);
+ (const BYTE*)buf, 78);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->metadata_format) {
StringFromGUID2(list->metadata_format, buf, 39);
res = RegSetValueExW(clsid_key, metadataformat_valuename, 0, REG_SZ,
- (CONST BYTE*)(buf), 78);
+ (const BYTE*)buf, 78);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->version) {
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->version),
+ (const BYTE*)list->version,
strlen(list->version) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->specversion) {
res = RegSetValueExA(clsid_key, specversion_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->version),
+ (const BYTE*)list->version,
strlen(list->version) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
res = RegSetValueExA(clsid_key, requiresfullstream_valuename, 0, REG_DWORD,
- (CONST BYTE*)(&list->requires_fullstream), 4);
+ (const BYTE*)&list->requires_fullstream, 4);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
res = RegSetValueExA(clsid_key, supportspadding_valuename, 0, REG_DWORD,
- (CONST BYTE*)(&list->supports_padding), 4);
+ (const BYTE*)&list->supports_padding, 4);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
if (list->requires_fixedsize) {
res = RegSetValueExA(clsid_key, requiresfixedsize_valuename, 0, REG_DWORD,
- (CONST BYTE*)(&list->requires_fixedsize), 4);
+ (const BYTE*)&list->requires_fixedsize, 4);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
@@ -854,7 +854,7 @@
KEY_READ | KEY_WRITE, NULL, &pattern_key,
NULL);
if (res != ERROR_SUCCESS) break;
res = RegSetValueExA(pattern_key, position_valuename, 0, REG_DWORD,
- (CONST
BYTE*)(&container->patterns[i].position), 4);
+ (const
BYTE*)&container->patterns[i].position, 4);
if (res == ERROR_SUCCESS)
res = RegSetValueExA(pattern_key, pattern_valuename, 0,
REG_BINARY,
container->patterns[i].pattern,
@@ -865,7 +865,7 @@
container->patterns[i].length);
if (res == ERROR_SUCCESS &&
container->patterns[i].data_offset)
res = RegSetValueExA(pattern_key, dataoffset_valuename, 0,
REG_DWORD,
- (CONST
BYTE*)&(container->patterns[i].data_offset), 4);
+ (const
BYTE*)&container->patterns[i].data_offset, 4);
RegCloseKey(pattern_key);
}
@@ -978,21 +978,21 @@
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key,
NULL);
if (res == ERROR_SUCCESS) {
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
- (CONST BYTE*)(buf), 78);
+ (const BYTE*)buf, 78);
RegCloseKey(instance_clsid_key);
}
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
if (list->author) {
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->author),
+ (const BYTE*)list->author,
strlen(list->author) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->friendlyname) {
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->friendlyname),
+ (const BYTE*)list->friendlyname,
strlen(list->friendlyname) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
@@ -1000,31 +1000,31 @@
if (list->vendor) {
StringFromGUID2(list->vendor, buf, 39);
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
- (CONST BYTE*)(buf), 78);
+ (const BYTE*)buf, 78);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->version) {
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
- (CONST BYTE*)(list->version),
+ (const BYTE*)list->version,
strlen(list->version) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
res = RegSetValueExA(clsid_key, bitsperpixel_valuename, 0, REG_DWORD,
- (CONST BYTE*)(&list->bitsperpixel), 4);
+ (const BYTE*)&list->bitsperpixel, 4);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
res = RegSetValueExA(clsid_key, channelcount_valuename, 0, REG_DWORD,
- (CONST BYTE*)(&list->channelcount), 4);
+ (const BYTE*)&list->channelcount, 4);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
res = RegSetValueExA(clsid_key, numericrepresentation_valuename, 0, REG_DWORD,
- (CONST BYTE*)(&list->numericrepresentation), 4);
+ (const BYTE*)&list->numericrepresentation, 4);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
res = RegSetValueExA(clsid_key, supportstransparency_valuename, 0, REG_DWORD,
- (CONST BYTE*)(&list->supportsalpha), 4);
+ (const BYTE*)&list->supportsalpha, 4);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
if (list->channelmasks) {
Modified: trunk/reactos/dll/win32/windowscodecs/tgaformat.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/tg…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/tgaformat.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/tgaformat.c [iso-8859-1] Thu Apr 24 12:12:56
2014
@@ -934,16 +934,14 @@
TgaDecoder_Frame_GetThumbnail
};
-HRESULT TgaDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT TgaDecoder_CreateInstance(REFIID iid, void** ppv)
{
TgaDecoder *This;
HRESULT ret;
- TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
+ TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
*ppv = NULL;
-
- if (pUnkOuter) return CLASS_E_NOAGGREGATION;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(TgaDecoder));
if (!This) return E_OUTOFMEMORY;
Modified: trunk/reactos/dll/win32/windowscodecs/tiffformat.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/ti…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/tiffformat.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/tiffformat.c [iso-8859-1] Thu Apr 24 12:12:56
2014
@@ -1279,16 +1279,14 @@
TiffFrameDecode_Block_GetEnumerator
};
-HRESULT TiffDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT TiffDecoder_CreateInstance(REFIID iid, void** ppv)
{
HRESULT ret;
TiffDecoder *This;
- TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
+ TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
*ppv = NULL;
-
- if (pUnkOuter) return CLASS_E_NOAGGREGATION;
if (!load_libtiff())
{
@@ -2023,16 +2021,14 @@
TiffEncoder_GetMetadataQueryWriter
};
-HRESULT TiffEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT TiffEncoder_CreateInstance(REFIID iid, void** ppv)
{
TiffEncoder *This;
HRESULT ret;
- TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
+ TRACE("(%s,%p)\n", debugstr_guid(iid), ppv);
*ppv = NULL;
-
- if (pUnkOuter) return CLASS_E_NOAGGREGATION;
if (!load_libtiff())
{
@@ -2062,13 +2058,13 @@
#else /* !SONAME_LIBTIFF */
-HRESULT TiffDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT TiffDecoder_CreateInstance(REFIID iid, void** ppv)
{
ERR("Trying to load TIFF picture, but Wine was compiled without TIFF
support.\n");
return E_FAIL;
}
-HRESULT TiffEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
+HRESULT TiffEncoder_CreateInstance(REFIID iid, void** ppv)
{
ERR("Trying to save TIFF picture, but Wine was compiled without TIFF
support.\n");
return E_FAIL;
Modified: trunk/reactos/dll/win32/windowscodecs/wincodecs_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/wi…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/wincodecs_private.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/wincodecs_private.h [iso-8859-1] Thu Apr 24
12:12:56 2014
@@ -54,22 +54,61 @@
DEFINE_GUID(GUID_VendorWine,
0xddf46da1,0x7dc1,0x404e,0x98,0xf2,0xef,0xa4,0x8d,0xfc,0x95,0x0a);
-extern HRESULT FormatConverter_CreateInstance(IUnknown *pUnkOuter, REFIID riid, void**
ppv) DECLSPEC_HIDDEN;
-extern HRESULT ComponentFactory_CreateInstance(IUnknown *pUnkOuter, REFIID riid, void**
ppv) DECLSPEC_HIDDEN;
-extern HRESULT BmpDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID riid, void** ppv)
DECLSPEC_HIDDEN;
-extern HRESULT PngDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
DECLSPEC_HIDDEN;
-extern HRESULT PngEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
DECLSPEC_HIDDEN;
-extern HRESULT BmpEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
DECLSPEC_HIDDEN;
-extern HRESULT DibDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
DECLSPEC_HIDDEN;
-extern HRESULT GifDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID riid, void** ppv)
DECLSPEC_HIDDEN;
-extern HRESULT IcoDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
DECLSPEC_HIDDEN;
-extern HRESULT JpegDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
DECLSPEC_HIDDEN;
-extern HRESULT JpegEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
DECLSPEC_HIDDEN;
-extern HRESULT TiffDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
DECLSPEC_HIDDEN;
-extern HRESULT TiffEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
DECLSPEC_HIDDEN;
-extern HRESULT IcnsEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
DECLSPEC_HIDDEN;
+DEFINE_GUID(IID_IMILBitmapSource,0x7543696a,0xbc8d,0x46b0,0x5f,0x81,0x8d,0x95,0x72,0x89,0x72,0xbe);
+#define INTERFACE IMILBitmapSource
+DECLARE_INTERFACE_(IMILBitmapSource,IUnknown)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IMILBitmapSource methods ***/
+ STDMETHOD_(HRESULT,GetSize)(THIS_ UINT *,UINT *);
+ STDMETHOD_(HRESULT,GetPixelFormat)(THIS_ int *);
+ STDMETHOD_(HRESULT,GetResolution)(THIS_ double *,double *);
+ STDMETHOD_(HRESULT,CopyPalette)(THIS_ IWICPalette *);
+ STDMETHOD_(HRESULT,CopyPixels)(THIS_ const WICRect *,UINT,UINT,BYTE *);
+ STDMETHOD_(HRESULT,UnknownMethod1)(THIS_ void **);
+};
+#undef INTERFACE
-extern HRESULT TgaDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
DECLSPEC_HIDDEN;
+#define INTERFACE IMILUnknown1
+DECLARE_INTERFACE_(IMILUnknown1,IUnknown)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+};
+#undef INTERFACE
+
+#define INTERFACE IMILUnknown2
+DECLARE_INTERFACE_(IMILUnknown2,IUnknown)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** unknown methods ***/
+ STDMETHOD_(HRESULT,UnknownMethod1)(THIS_ void *, void *) PURE;
+};
+#undef INTERFACE
+
+extern HRESULT FormatConverter_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN;
+extern HRESULT ComponentFactory_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN;
+extern HRESULT BmpDecoder_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN;
+extern HRESULT PngDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
+extern HRESULT PngEncoder_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 GifDecoder_CreateInstance(REFIID riid, 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 JpegEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
+extern HRESULT TiffDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
+extern HRESULT TiffEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
+extern HRESULT IcnsEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
+extern HRESULT TgaDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
extern HRESULT BitmapImpl_Create(UINT uiWidth, UINT uiHeight,
UINT stride, UINT datasize, BYTE *bits,
@@ -122,16 +161,16 @@
ULARGE_INTEGER *size);
} MetadataHandlerVtbl;
-extern HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown
*pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
+extern HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, REFIID iid,
void** ppv) DECLSPEC_HIDDEN;
-extern HRESULT UnknownMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid,
void** ppv) DECLSPEC_HIDDEN;
-extern HRESULT IfdMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void
**ppv) DECLSPEC_HIDDEN;
-extern HRESULT PngTextReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
DECLSPEC_HIDDEN;
-extern HRESULT LSDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv)
DECLSPEC_HIDDEN;
-extern HRESULT IMDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv)
DECLSPEC_HIDDEN;
-extern HRESULT GCEReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv)
DECLSPEC_HIDDEN;
-extern HRESULT APEReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv)
DECLSPEC_HIDDEN;
-extern HRESULT GifCommentReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void
**ppv) DECLSPEC_HIDDEN;
+extern HRESULT UnknownMetadataReader_CreateInstance(REFIID iid, void** ppv)
DECLSPEC_HIDDEN;
+extern HRESULT IfdMetadataReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
+extern HRESULT PngTextReader_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
+extern HRESULT LSDReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
+extern HRESULT IMDReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
+extern HRESULT GCEReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
+extern HRESULT APEReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
+extern HRESULT GifCommentReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
extern HRESULT stream_initialize_from_filehandle(IWICStream *iface, HANDLE hfile)
DECLSPEC_HIDDEN;
Modified: trunk/reactos/dll/win32/windowscodecs/windowscodecs.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/wi…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/windowscodecs.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/windowscodecs/windowscodecs.spec [iso-8859-1] Thu Apr 24
12:12:56 2014
@@ -4,7 +4,7 @@
@ stdcall -private DllUnregisterServer()
@ stub IEnumString_Next_WIC_Proxy
@ stub IEnumString_Reset_WIC_Proxy
-@ stub IPropertyBag2_Write_Proxy
+@ stdcall IPropertyBag2_Write_Proxy(ptr long ptr ptr)
@ stdcall IWICBitmapClipper_Initialize_Proxy(ptr ptr ptr)
IWICBitmapClipper_Initialize_Proxy_W
@ stdcall IWICBitmapCodecInfo_DoesSupportAnimation_Proxy(ptr ptr)
IWICBitmapCodecInfo_DoesSupportAnimation_Proxy_W
@ stdcall IWICBitmapCodecInfo_DoesSupportLossless_Proxy(ptr ptr)
IWICBitmapCodecInfo_DoesSupportLossless_Proxy_W
@@ -114,4 +114,4 @@
@ stub WICMapShortNameToGuid
@ stub WICMatchMetadataContent
@ stub WICSerializeMetadataContent
-@ stub WICSetEncoderFormat_Proxy
+@ stdcall WICSetEncoderFormat_Proxy(ptr ptr ptr ptr)
Modified: trunk/reactos/dll/win32/windowscodecs/windowscodecs_wincodec.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/wi…
==============================================================================
--- trunk/reactos/dll/win32/windowscodecs/windowscodecs_wincodec.idl [iso-8859-1]
(original)
+++ trunk/reactos/dll/win32/windowscodecs/windowscodecs_wincodec.idl [iso-8859-1] Thu Apr
24 12:12:56 2014
@@ -15,6 +15,9 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+
+#pragma makedep proxy
+#pragma makedep register
#include "wincodec.idl"
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Apr 24 12:12:56 2014
@@ -203,7 +203,7 @@
reactos/dll/win32/wbemdisp # Synced to Wine-1.7.17
reactos/dll/win32/wbemprox # Synced to Wine-1.7.2
reactos/dll/win32/wer # Autosync
-reactos/dll/win32/windowscodecs # Synced to Wine-1.7.1
+reactos/dll/win32/windowscodecs # Synced to Wine-1.7.17
reactos/dll/win32/windowscodecsext # Synced to Wine-1.7.1
reactos/dll/win32/winemp3.acm # Synced to Wine-1.7.1
reactos/dll/win32/wing32 # Out of sync