gdiplus/tests: Indicate which encoder failed when attempting to save image.
Signed-off-by: Jeff Smith <whydoubt@gmail.com> Signed-off-by: Vincent Povirk <vincent@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5d4db497ad
commit
f3c03ecb82
|
@ -5106,22 +5106,17 @@ static void test_CloneBitmapArea(void)
|
||||||
|
|
||||||
static void test_supported_encoders(void)
|
static void test_supported_encoders(void)
|
||||||
{
|
{
|
||||||
static const WCHAR bmp_mimetype[] = { 'i', 'm', 'a','g', 'e', '/', 'b', 'm', 'p',0 };
|
|
||||||
static const WCHAR jpeg_mimetype[] = { 'i','m','a','g','e','/','j','p','e','g',0 };
|
|
||||||
static const WCHAR gif_mimetype[] = { 'i','m','a','g','e','/','g','i','f',0 };
|
|
||||||
static const WCHAR tiff_mimetype[] = { 'i','m','a','g','e','/','t','i','f','f',0 };
|
|
||||||
static const WCHAR png_mimetype[] = { 'i','m','a','g','e','/','p','n','g',0 };
|
|
||||||
static const struct test_data
|
static const struct test_data
|
||||||
{
|
{
|
||||||
LPCWSTR mime;
|
LPCWSTR mime;
|
||||||
const GUID *format;
|
const GUID *format;
|
||||||
} td[] =
|
} td[] =
|
||||||
{
|
{
|
||||||
{ bmp_mimetype, &ImageFormatBMP },
|
{ L"image/bmp", &ImageFormatBMP },
|
||||||
{ jpeg_mimetype, &ImageFormatJPEG },
|
{ L"image/jpeg", &ImageFormatJPEG },
|
||||||
{ gif_mimetype, &ImageFormatGIF },
|
{ L"image/gif", &ImageFormatGIF },
|
||||||
{ tiff_mimetype, &ImageFormatTIFF },
|
{ L"image/tiff", &ImageFormatTIFF },
|
||||||
{ png_mimetype, &ImageFormatPNG }
|
{ L"image/png", &ImageFormatPNG }
|
||||||
};
|
};
|
||||||
GUID format, clsid;
|
GUID format, clsid;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
@ -5147,7 +5142,7 @@ static void test_supported_encoders(void)
|
||||||
ok(hr == S_OK, "CreateStreamOnHGlobal error %#x\n", hr);
|
ok(hr == S_OK, "CreateStreamOnHGlobal error %#x\n", hr);
|
||||||
|
|
||||||
status = GdipSaveImageToStream((GpImage *)bm, stream, &clsid, NULL);
|
status = GdipSaveImageToStream((GpImage *)bm, stream, &clsid, NULL);
|
||||||
ok(status == Ok, "GdipSaveImageToStream error %d\n", status);
|
ok(status == Ok, "%s encoder, GdipSaveImageToStream error %d\n", wine_dbgstr_w(td[i].mime), status);
|
||||||
|
|
||||||
IStream_Release(stream);
|
IStream_Release(stream);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue