* Sync with Wine 1.7.17.
CORE-8080
svn path=/trunk/; revision=62937
add_executable(windowscodecs_winetest ${SOURCE})
set_module_type(windowscodecs_winetest win32cui)
-add_importlibs(windowscodecs_winetest windowscodecs oleaut32 ole32 user32 gdi32 msvcrt kernel32 ntdll)
+add_importlibs(windowscodecs_winetest windowscodecs oleaut32 ole32 user32 gdi32 msvcrt kernel32)
+if(MSVC)
+ add_importlibs(windowscodecs_winetest ntdll)
+endif()
add_cd_file(TARGET windowscodecs_winetest DESTINATION reactos/bin FOR all)
static IWICImagingFactory *factory;
-static const char *debugstr_guid(const GUID *guid)
-{
- static char buf[50];
-
- if (!guid) return "(null)";
- sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
- guid->Data1, guid->Data2, guid->Data3, guid->Data4[0],
- guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4],
- guid->Data4[5], guid->Data4[6], guid->Data4[7]);
- return buf;
-}
-
static HRESULT WINAPI bitmapsource_QueryInterface(IWICBitmapSource *iface, REFIID iid, void **ppv)
{
if (IsEqualIID(&IID_IUnknown, iid) ||
hdib = CreateDIBSection(0, bmi, DIB_RGB_COLORS, &bits, NULL, 0);
ok(hdib != 0, "CreateDIBSection(%dx%d,%d bpp) failed\n", width, height, bpp);
- GetObject(hdib, sizeof(bm), &bm);
+ GetObjectW(hdib, sizeof(bm), &bm);
ok(bm.bmWidth == width, "expected %d, got %d\n", width, bm.bmWidth);
ok(bm.bmHeight == height, "expected %d, got %d\n", height, bm.bmHeight);
ok(bm.bmPlanes == 1, "expected 1, got %d\n", bm.bmPlanes);
IWICBitmap_GetPixelFormat(bitmap, &format);
ok(IsEqualGUID(&format, &GUID_WICPixelFormat32bppBGRA),
- "unexpected pixel format %s\n", debugstr_guid(&format));
+ "unexpected pixel format %s\n", wine_dbgstr_guid(&format));
IWICBitmap_GetSize(bitmap, &width, &height);
ok(hr == S_OK, "IWICBitmap_GetSize error %#x\n", hr);
IWICBitmap_GetPixelFormat(bitmap, &format);
ok(IsEqualGUID(&format, &GUID_WICPixelFormat32bppBGRA),
- "unexpected pixel format %s\n", debugstr_guid(&format));
+ "unexpected pixel format %s\n", wine_dbgstr_guid(&format));
IWICBitmap_GetSize(bitmap, &width, &height);
ok(hr == S_OK, "IWICBitmap_GetSize error %#x\n", hr);
ok(hbmp != 0, "failed to create bitmap\n");
hr = IWICImagingFactory_CreateBitmapFromHBITMAP(factory, 0, 0, WICBitmapIgnoreAlpha, &bitmap);
-todo_wine
ok(hr == WINCODEC_ERR_WIN32ERROR || hr == 0x88980003 /*XP*/, "expected WINCODEC_ERR_WIN32ERROR, got %#x\n", hr);
hr = IWICImagingFactory_CreateBitmapFromHBITMAP(factory, hbmp, 0, WICBitmapIgnoreAlpha, NULL);
-todo_wine
ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr);
hr = IWICImagingFactory_CreateBitmapFromHBITMAP(factory, hbmp, 0, WICBitmapIgnoreAlpha, &bitmap);
-todo_wine
ok(hr == S_OK, "CreateBitmapFromHBITMAP error %#x\n", hr);
- if (hr != S_OK) return;
IWICBitmap_GetPixelFormat(bitmap, &format);
ok(IsEqualGUID(&format, &GUID_WICPixelFormat8bppIndexed),
- "unexpected pixel format %s\n", debugstr_guid(&format));
+ "unexpected pixel format %s\n", wine_dbgstr_guid(&format));
hr = IWICBitmap_GetSize(bitmap, &width, &height);
ok(hr == S_OK, "IWICBitmap_GetSize error %#x\n", hr);
ok(hr == S_OK, "CreateBitmapFromHBITMAP error %#x\n", hr);
IWICBitmap_GetPixelFormat(bitmap, &format);
+todo_wine
ok(IsEqualGUID(&format, &GUID_WICPixelFormat4bppIndexed),
- "unexpected pixel format %s\n", debugstr_guid(&format));
+ "unexpected pixel format %s\n", wine_dbgstr_guid(&format));
hr = IWICBitmap_GetSize(bitmap, &width, &height);
ok(hr == S_OK, "IWICBitmap_GetSize error %#x\n", hr);
hr = IWICPalette_GetColorCount(palette, &count);
ok(hr == S_OK, "GetColorCount error %#x\n", hr);
+todo_wine
ok(count == 16, "expected 16, got %u\n", count);
IWICPalette_Release(palette);
IWICBitmap_GetPixelFormat(bitmap, &format);
ok(IsEqualGUID(&format, &GUID_WICPixelFormat8bppIndexed),
- "unexpected pixel format %s\n", debugstr_guid(&format));
+ "unexpected pixel format %s\n", wine_dbgstr_guid(&format));
hr = IWICBitmap_GetSize(bitmap, &width, &height);
ok(hr == S_OK, "IWICBitmap_GetSize error %#x\n", hr);
hr = IWICBitmap_CopyPixels(bitmap, NULL, 4, sizeof(data), data);
ok(hr == S_OK, "IWICBitmap_CopyPixels error %#x\n", hr);
for (i = 0; i < sizeof(data); i++)
- ok(data[i] == data_8bpp_pal_wic[i], "%u: expected %#x, got %#x\n", i, data_8bpp_pal_wic[i], data[i]);
+ {
+ if (data[i] != data_8bpp_pal_wic[i])
+todo_wine
+ ok(data[i] == data_8bpp_pal_wic[i], "%u: expected %#x, got %#x\n", i, data_8bpp_pal_wic[i], data[i]);
+ else
+ ok(data[i] == data_8bpp_pal_wic[i], "%u: expected %#x, got %#x\n", i, data_8bpp_pal_wic[i], data[i]);
+ }
IWICBitmap_Release(bitmap);
DeleteObject(hbmp);
DeleteObject(hpal);
+
+ /* 32bpp alpha */
+ hbmp = create_dib(2, 2, 32, NULL, NULL);
+ hr = IWICImagingFactory_CreateBitmapFromHBITMAP(factory, hbmp, NULL, WICBitmapUseAlpha, &bitmap);
+ ok(hr == S_OK, "CreateBitmapFromHBITMAP error %#x\n", hr);
+
+ hr = IWICBitmap_GetPixelFormat(bitmap, &format);
+ ok(hr == S_OK, "GetPixelFormat error %#x\n", hr);
+ ok(IsEqualGUID(&format, &GUID_WICPixelFormat32bppBGRA),
+ "unexpected pixel format %s\n", wine_dbgstr_guid(&format));
+
+ IWICBitmap_Release(bitmap);
+
+ /* 32bpp pre-multiplied alpha */
+ hr = IWICImagingFactory_CreateBitmapFromHBITMAP(factory, hbmp, NULL, WICBitmapUsePremultipliedAlpha, &bitmap);
+ ok(hr == S_OK, "CreateBitmapFromHBITMAP error %#x\n", hr);
+
+ hr = IWICBitmap_GetPixelFormat(bitmap, &format);
+ ok(hr == S_OK, "GetPixelFormat error %#x\n", hr);
+ ok(IsEqualGUID(&format, &GUID_WICPixelFormat32bppPBGRA),
+ "unexpected pixel format %s\n", wine_dbgstr_guid(&format));
+
+ IWICBitmap_Release(bitmap);
+
+ /* 32bpp no alpha */
+ hr = IWICImagingFactory_CreateBitmapFromHBITMAP(factory, hbmp, NULL, WICBitmapIgnoreAlpha, &bitmap);
+ ok(hr == S_OK, "CreateBitmapFromHBITMAP error %#x\n", hr);
+
+ hr = IWICBitmap_GetPixelFormat(bitmap, &format);
+ ok(hr == S_OK, "GetPixelFormat error %#x\n", hr);
+ ok(IsEqualGUID(&format, &GUID_WICPixelFormat32bppBGR),
+ "unexpected pixel format %s\n", wine_dbgstr_guid(&format));
+
+ IWICBitmap_Release(bitmap);
+ DeleteObject(hbmp);
}
static void test_clipper(void)
{
BitmapTestSrc *src_obj;
IWICFormatConverter *converter;
- BOOL can_convert=1;
+ BOOL can_convert = TRUE;
HRESULT hr;
CreateTestBitmap(&testdata_32bppBGRA, &src_obj);
{
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
- test_conversion(&testdata_32bppBGRA, &testdata_32bppBGR, "BGRA -> BGR", 0);
- test_conversion(&testdata_32bppBGR, &testdata_32bppBGRA, "BGR -> BGRA", 0);
- test_conversion(&testdata_32bppBGRA, &testdata_32bppBGRA, "BGRA -> BGRA", 0);
+ test_conversion(&testdata_32bppBGRA, &testdata_32bppBGR, "BGRA -> BGR", FALSE);
+ test_conversion(&testdata_32bppBGR, &testdata_32bppBGRA, "BGR -> BGRA", FALSE);
+ test_conversion(&testdata_32bppBGRA, &testdata_32bppBGRA, "BGRA -> BGRA", FALSE);
- test_conversion(&testdata_24bppBGR, &testdata_24bppBGR, "24bppBGR -> 24bppBGR", 0);
- test_conversion(&testdata_24bppBGR, &testdata_24bppRGB, "24bppBGR -> 24bppRGB", 0);
+ test_conversion(&testdata_24bppBGR, &testdata_24bppBGR, "24bppBGR -> 24bppBGR", FALSE);
+ test_conversion(&testdata_24bppBGR, &testdata_24bppRGB, "24bppBGR -> 24bppRGB", FALSE);
- test_conversion(&testdata_24bppRGB, &testdata_24bppRGB, "24bppRGB -> 24bppRGB", 0);
- test_conversion(&testdata_24bppRGB, &testdata_24bppBGR, "24bppRGB -> 24bppBGR", 0);
+ test_conversion(&testdata_24bppRGB, &testdata_24bppRGB, "24bppRGB -> 24bppRGB", FALSE);
+ test_conversion(&testdata_24bppRGB, &testdata_24bppBGR, "24bppRGB -> 24bppBGR", FALSE);
- test_conversion(&testdata_32bppBGR, &testdata_24bppRGB, "32bppBGR -> 24bppRGB", 0);
- test_conversion(&testdata_24bppRGB, &testdata_32bppBGR, "24bppRGB -> 32bppBGR", 0);
+ test_conversion(&testdata_32bppBGR, &testdata_24bppRGB, "32bppBGR -> 24bppRGB", FALSE);
+ test_conversion(&testdata_24bppRGB, &testdata_32bppBGR, "24bppRGB -> 32bppBGR", FALSE);
test_invalid_conversion();
test_default_converter();
static IWICImagingFactory *factory;
-static const char *debugstr_guid(const GUID *guid)
-{
- static char buf[50];
-
- if (!guid) return "(null)";
- sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
- guid->Data1, guid->Data2, guid->Data3, guid->Data4[0],
- guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4],
- guid->Data4[5], guid->Data4[6], guid->Data4[7]);
- return buf;
-}
-
static IWICBitmapDecoder *create_decoder(const void *image_data, UINT image_size)
{
HGLOBAL hmem;
hr = IWICBitmapDecoder_GetContainerFormat(decoder, &format);
ok(hr == S_OK, "GetContainerFormat error %#x\n", hr);
ok(IsEqualGUID(&format, &GUID_ContainerFormatGif),
- "wrong container format %s\n", debugstr_guid(&format));
+ "wrong container format %s\n", wine_dbgstr_guid(&format));
IStream_Release(stream);
hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &format);
ok(hr == S_OK, "GetPixelFormat error %#x\n", hr);
ok(IsEqualGUID(&format, &GUID_WICPixelFormat8bppIndexed),
- "wrong pixel format %s\n", debugstr_guid(&format));
+ "wrong pixel format %s\n", wine_dbgstr_guid(&format));
hr = IWICBitmapFrameDecode_CopyPalette(frame, palette);
ok(hr == S_OK, "CopyPalette error %#x\n", hr);
hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &format);
ok(hr == S_OK, "GetPixelFormat error %#x\n", hr);
ok(IsEqualGUID(&format, &GUID_WICPixelFormat8bppIndexed),
- "wrong pixel format %s\n", debugstr_guid(&format));
+ "wrong pixel format %s\n", wine_dbgstr_guid(&format));
hr = IWICBitmapFrameDecode_CopyPalette(frame, palette);
ok(hr == S_OK, "CopyPalette error %#x\n", hr);
hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &format);
ok(hr == S_OK, "GetPixelFormat error %#x\n", hr);
ok(IsEqualGUID(&format, &GUID_WICPixelFormat8bppIndexed),
- "wrong pixel format %s\n", debugstr_guid(&format));
+ "wrong pixel format %s\n", wine_dbgstr_guid(&format));
hr = IWICBitmapFrameDecode_CopyPalette(frame, palette);
ok(hr == S_OK, "CopyPalette error %#x\n", hr);
hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &format);
ok(hr == S_OK, "GetPixelFormat error %#x\n", hr);
ok(IsEqualGUID(&format, &GUID_WICPixelFormat8bppIndexed),
- "wrong pixel format %s\n", debugstr_guid(&format));
+ "wrong pixel format %s\n", wine_dbgstr_guid(&format));
hr = IWICBitmapFrameDecode_CopyPalette(frame, palette);
ok(hr == S_OK, "CopyPalette error %#x\n", hr);
#include <initguid.h>
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
-static const char *debugstr_guid(GUID *guid)
-{
- static char buf[50];
-
- if(!guid)
- return "(null)";
-
- sprintf(buf, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
- guid->Data1, guid->Data2, guid->Data3, guid->Data4[0],
- guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4],
- guid->Data4[5], guid->Data4[6], guid->Data4[7]);
-
- return buf;
-}
-
static HRESULT get_component_info(const GUID *clsid, IWICComponentInfo **result)
{
IWICImagingFactory *factory;
return hr;
}
-static int is_pixelformat(GUID *format)
+static BOOL is_pixelformat(GUID *format)
{
IWICComponentInfo *info;
HRESULT hr;
memset(&guid, 0xaa, sizeof(guid));
hr = IWICComponentInfo_GetCLSID(info, &guid);
ok(hr == S_OK, "GetCLSID failed, hr=%x\n", hr);
- ok(IsEqualGUID(&guid, &GUID_WICPixelFormat32bppBGRA), "unexpected CLSID %s\n", debugstr_guid(&guid));
+ ok(IsEqualGUID(&guid, &GUID_WICPixelFormat32bppBGRA), "unexpected CLSID %s\n", wine_dbgstr_guid(&guid));
hr = IWICComponentInfo_GetComponentType(info, NULL);
ok(hr == E_INVALIDARG, "GetComponentType failed, hr=%x\n", hr);
hr = IWICComponentInfo_GetVendorGUID(info, &guid);
ok(hr == S_OK, "GetVendorGUID failed, hr=%x\n", hr);
ok(IsEqualGUID(&guid, &GUID_VendorMicrosoft) ||
- broken(IsEqualGUID(&guid, &GUID_NULL)) /* XP */, "unexpected GUID %s\n", debugstr_guid(&guid));
+ broken(IsEqualGUID(&guid, &GUID_NULL)) /* XP */, "unexpected GUID %s\n", wine_dbgstr_guid(&guid));
len = 0xdeadbeef;
hr = IWICComponentInfo_GetVersion(info, 0, NULL, &len);
memset(&guid, 0xaa, sizeof(guid));
hr = IWICPixelFormatInfo_GetFormatGUID(pixelformat_info, &guid);
ok(hr == S_OK, "GetFormatGUID failed, hr=%x\n", hr);
- ok(IsEqualGUID(&guid, &GUID_WICPixelFormat32bppBGRA), "unexpected GUID %s\n", debugstr_guid(&guid));
+ ok(IsEqualGUID(&guid, &GUID_WICPixelFormat32bppBGRA), "unexpected GUID %s\n", wine_dbgstr_guid(&guid));
IWICPixelFormatInfo_Release(pixelformat_info);
}
0x21,0x01,0x0C,'p','l','a','i','n','t','e','x','t',' ','#','2',0x00,0x3B
};
-static const char *debugstr_guid(REFIID riid)
-{
- static char buf[50];
-
- if(!riid)
- return "(null)";
-
- sprintf(buf, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
- riid->Data1, riid->Data2, riid->Data3, riid->Data4[0],
- riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4],
- riid->Data4[5], riid->Data4[6], riid->Data4[7]);
-
- return buf;
-}
-
static IStream *create_stream(const char *data, int data_size)
{
HRESULT hr;
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(hr == S_OK, "GetMetadataFormat failed, hr=%x\n", hr);
- ok(IsEqualGUID(&format, &GUID_MetadataFormatChunktEXt), "unexpected format %s\n", debugstr_guid(&format));
+ ok(IsEqualGUID(&format, &GUID_MetadataFormatChunktEXt), "unexpected format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataReader_GetMetadataFormat(reader, NULL);
ok(hr == E_INVALIDARG, "GetMetadataFormat failed, hr=%x\n", hr);
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr);
- ok(IsEqualGUID(&format, &GUID_MetadataFormatIfd), "unexpected format %s\n", debugstr_guid(&format));
+ ok(IsEqualGUID(&format, &GUID_MetadataFormatIfd), "unexpected format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataReader_GetMetadataFormat(reader, NULL);
ok(hr == E_INVALIDARG, "GetMetadataFormat should fail\n");
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(hr == S_OK, "GetMetadataFormat failed, hr=%x\n", hr);
- ok(IsEqualGUID(&format, &GUID_MetadataFormatChunktEXt), "unexpected format %s\n", debugstr_guid(&format));
+ ok(IsEqualGUID(&format, &GUID_MetadataFormatChunktEXt), "unexpected format %s\n", wine_dbgstr_guid(&format));
IWICMetadataReader_Release(reader);
}
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(hr == S_OK, "GetMetadataFormat failed, hr=%x\n", hr);
- ok(IsEqualGUID(&format, &GUID_MetadataFormatUnknown), "unexpected format %s\n", debugstr_guid(&format));
+ ok(IsEqualGUID(&format, &GUID_MetadataFormatUnknown), "unexpected format %s\n", wine_dbgstr_guid(&format));
IWICMetadataReader_Release(reader);
}
hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &format);
ok(hr == S_OK, "GetContainerFormat error %#x\n", hr);
ok(IsEqualGUID(&format, &GUID_ContainerFormatGif),
- "wrong container format %s\n", debugstr_guid(&format));
+ "wrong container format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataBlockReader_GetCount(blockreader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
{
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(IsEqualGUID(&format, &GUID_MetadataFormatLSD), /* Logical Screen Descriptor */
- "wrong metadata format %s\n", debugstr_guid(&format));
+ "wrong metadata format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &format);
ok(hr == S_OK, "GetContainerFormat error %#x\n", hr);
ok(IsEqualGUID(&format, &GUID_ContainerFormatGif),
- "wrong container format %s\n", debugstr_guid(&format));
+ "wrong container format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataBlockReader_GetCount(blockreader, NULL);
ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr);
{
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(IsEqualGUID(&format, &GUID_MetadataFormatIMD), /* Image Descriptor */
- "wrong metadata format %s\n", debugstr_guid(&format));
+ "wrong metadata format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &format);
ok(hr == S_OK, "GetContainerFormat error %#x\n", hr);
ok(IsEqualGUID(&format, &GUID_ContainerFormatGif),
- "wrong container format %s\n", debugstr_guid(&format));
+ "wrong container format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataBlockReader_GetCount(blockreader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
{
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(IsEqualGUID(&format, &GUID_MetadataFormatLSD), /* Logical Screen Descriptor */
- "wrong metadata format %s\n", debugstr_guid(&format));
+ "wrong metadata format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
{
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(IsEqualGUID(&format, &GUID_MetadataFormatAPE), /* Application Extension */
- "wrong metadata format %s\n", debugstr_guid(&format));
+ "wrong metadata format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
{
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(IsEqualGUID(&format, &GUID_MetadataFormatGifComment), /* Comment Extension */
- "wrong metadata format %s\n", debugstr_guid(&format));
+ "wrong metadata format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
{
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(IsEqualGUID(&format, &GUID_MetadataFormatUnknown),
- "wrong metadata format %s\n", debugstr_guid(&format));
+ "wrong metadata format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &format);
ok(hr == S_OK, "GetContainerFormat error %#x\n", hr);
ok(IsEqualGUID(&format, &GUID_ContainerFormatGif),
- "wrong container format %s\n", debugstr_guid(&format));
+ "wrong container format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataBlockReader_GetCount(blockreader, NULL);
ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr);
{
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(IsEqualGUID(&format, &GUID_MetadataFormatIMD), /* Image Descriptor */
- "wrong metadata format %s\n", debugstr_guid(&format));
+ "wrong metadata format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
{
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(IsEqualGUID(&format, &GUID_MetadataFormatGifComment), /* Comment Extension */
- "wrong metadata format %s\n", debugstr_guid(&format));
+ "wrong metadata format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
{
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(IsEqualGUID(&format, &GUID_MetadataFormatUnknown),
- "wrong metadata format %s\n", debugstr_guid(&format));
+ "wrong metadata format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
{
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(IsEqualGUID(&format, &GUID_MetadataFormatGCE), /* Graphic Control Extension */
- "wrong metadata format %s\n", debugstr_guid(&format));
+ "wrong metadata format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr);
- ok(IsEqualGUID(&format, &GUID_MetadataFormatLSD), "wrong format %s\n", debugstr_guid(&format));
+ ok(IsEqualGUID(&format, &GUID_MetadataFormatLSD), "wrong format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataReader_GetMetadataHandlerInfo(reader, &info);
ok(hr == S_OK, "GetMetadataHandlerInfo error %#x\n", hr);
hr = IWICMetadataHandlerInfo_GetCLSID(info, &id);
ok(hr == S_OK, "GetCLSID error %#x\n", hr);
- ok(IsEqualGUID(&id, &CLSID_WICLSDMetadataReader), "wrong CLSID %s\n", debugstr_guid(&id));
+ ok(IsEqualGUID(&id, &CLSID_WICLSDMetadataReader), "wrong CLSID %s\n", wine_dbgstr_guid(&id));
hr = IWICMetadataHandlerInfo_GetFriendlyName(info, 64, name, &dummy);
ok(hr == S_OK, "GetFriendlyName error %#x\n", hr);
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr);
- ok(IsEqualGUID(&format, &GUID_MetadataFormatIMD), "wrong format %s\n", debugstr_guid(&format));
+ ok(IsEqualGUID(&format, &GUID_MetadataFormatIMD), "wrong format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataReader_GetMetadataHandlerInfo(reader, &info);
ok(hr == S_OK, "GetMetadataHandlerInfo error %#x\n", hr);
hr = IWICMetadataHandlerInfo_GetCLSID(info, &id);
ok(hr == S_OK, "GetCLSID error %#x\n", hr);
- ok(IsEqualGUID(&id, &CLSID_WICIMDMetadataReader), "wrong CLSID %s\n", debugstr_guid(&id));
+ ok(IsEqualGUID(&id, &CLSID_WICIMDMetadataReader), "wrong CLSID %s\n", wine_dbgstr_guid(&id));
hr = IWICMetadataHandlerInfo_GetFriendlyName(info, 64, name, &dummy);
ok(hr == S_OK, "GetFriendlyName error %#x\n", hr);
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr);
- ok(IsEqualGUID(&format, &GUID_MetadataFormatGCE), "wrong format %s\n", debugstr_guid(&format));
+ ok(IsEqualGUID(&format, &GUID_MetadataFormatGCE), "wrong format %s\n", wine_dbgstr_guid(&format));
hr = IWICMetadataReader_GetMetadataHandlerInfo(reader, &info);
ok(hr == S_OK, "GetMetadataHandlerInfo error %#x\n", hr);
hr = IWICMetadataHandlerInfo_GetCLSID(info, &id);
ok(hr == S_OK, "GetCLSID error %#x\n", hr);
- ok(IsEqualGUID(&id, &CLSID_WICGCEMetadataReader), "wrong CLSID %s\n", debugstr_guid(&id));
+ ok(IsEqualGUID(&id, &CLSID_WICGCEMetadataReader), "wrong CLSID %s\n", wine_dbgstr_guid(&id));
hr = IWICMetadataHandlerInfo_GetFriendlyName(info, 64, name, &dummy);
ok(hr == S_OK, "GetFriendlyName error %#x\n", hr);
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr);
- ok(IsEqualGUID(&format, &GUID_MetadataFormatAPE), "wrong format %s\n", debugstr_guid(&format));
+ ok(IsEqualGUID(&format, &GUID_MetadataFormatAPE), "wrong format %s\n", wine_dbgstr_guid(&format));
PropVariantInit(&value);
id.vt = VT_LPWSTR;
hr = IWICMetadataHandlerInfo_GetCLSID(info, &clsid);
ok(hr == S_OK, "GetCLSID error %#x\n", hr);
- ok(IsEqualGUID(&clsid, &CLSID_WICAPEMetadataReader), "wrong CLSID %s\n", debugstr_guid(&clsid));
+ ok(IsEqualGUID(&clsid, &CLSID_WICAPEMetadataReader), "wrong CLSID %s\n", wine_dbgstr_guid(&clsid));
hr = IWICMetadataHandlerInfo_GetFriendlyName(info, 64, name, &dummy);
ok(hr == S_OK, "GetFriendlyName error %#x\n", hr);
hr = IWICMetadataReader_GetMetadataFormat(reader, &format);
ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr);
- ok(IsEqualGUID(&format, &GUID_MetadataFormatGifComment), "wrong format %s\n", debugstr_guid(&format));
+ ok(IsEqualGUID(&format, &GUID_MetadataFormatGifComment), "wrong format %s\n", wine_dbgstr_guid(&format));
PropVariantInit(&value);
id.vt = VT_LPWSTR;
hr = IWICMetadataHandlerInfo_GetCLSID(info, &clsid);
ok(hr == S_OK, "GetCLSID error %#x\n", hr);
- ok(IsEqualGUID(&clsid, &CLSID_WICGifCommentMetadataReader), "wrong CLSID %s\n", debugstr_guid(&clsid));
+ ok(IsEqualGUID(&clsid, &CLSID_WICGifCommentMetadataReader), "wrong CLSID %s\n", wine_dbgstr_guid(&clsid));
hr = IWICMetadataHandlerInfo_GetFriendlyName(info, 64, name, &dummy);
ok(hr == S_OK, "GetFriendlyName error %#x\n", hr);
static IWICImagingFactory *factory;
-static const char *debugstr_guid(const GUID *guid)
-{
- static char buf[50];
-
- if (!guid) return "(null)";
- sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
- guid->Data1, guid->Data2, guid->Data3, guid->Data4[0],
- guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4],
- guid->Data4[5], guid->Data4[6], guid->Data4[7]);
- return buf;
-}
-
static IWICBitmapDecoder *create_decoder(const void *image_data, UINT image_size)
{
HGLOBAL hmem;
hr = IWICBitmapDecoder_GetContainerFormat(decoder, &format);
ok(hr == S_OK, "GetContainerFormat error %#x\n", hr);
ok(IsEqualGUID(&format, &GUID_ContainerFormatPng),
- "wrong container format %s\n", debugstr_guid(&format));
+ "wrong container format %s\n", wine_dbgstr_guid(&format));
IStream_Release(stream);
hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &format);
ok(hr == S_OK, "GetPixelFormat error %#x\n", hr);
ok(IsEqualGUID(&format, &GUID_WICPixelFormat1bppIndexed),
- "got wrong format %s\n", debugstr_guid(&format));
+ "got wrong format %s\n", wine_dbgstr_guid(&format));
hr = IWICImagingFactory_CreatePalette(factory, &palette);
ok(hr == S_OK, "CreatePalette error %#x\n", hr);
/* Automatically generated file; DO NOT EDIT!! */
#define STANDALONE
-#include "wine/test.h"
+#include <wine/test.h>
extern void func_bitmap(void);
extern void func_bmpformat(void);
static IWICImagingFactory *factory;
-static const char *debugstr_guid(const GUID *guid)
-{
- static char buf[50];
-
- if (!guid) return "(null)";
- sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
- guid->Data1, guid->Data2, guid->Data3, guid->Data4[0],
- guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4],
- guid->Data4[5], guid->Data4[6], guid->Data4[7]);
- return buf;
-}
-
static IStream *create_stream(const void *data, int data_size)
{
HRESULT hr;
hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &format);
ok(hr == S_OK, "GetPixelFormat error %#x\n", hr);
ok(IsEqualGUID(&format, &GUID_WICPixelFormatBlackWhite),
- "got wrong format %s\n", debugstr_guid(&format));
+ "got wrong format %s\n", wine_dbgstr_guid(&format));
hr = IWICImagingFactory_CreatePalette(factory, &palette);
ok(hr == S_OK, "CreatePalette error %#x\n", hr);