windowscodecs: Add test for PNG encoder.

oldstable
Vincent Povirk 2009-09-23 13:46:06 -05:00 committed by Alexandre Julliard
parent 3db6ef4980
commit d80630e8c9
1 changed files with 9 additions and 0 deletions

View File

@ -236,6 +236,12 @@ static void compare_bitmap_data(const struct bitmap_data *expect, IWICBitmapSour
HeapFree(GetProcessHeap(), 0, converted_bits);
}
static const BYTE bits_24bppBGR[] = {
255,0,0, 0,255,0, 0,0,255, 0,0,0,
0,255,255, 255,0,255, 255,255,0, 255,255,255};
static const struct bitmap_data testdata_24bppBGR = {
&GUID_WICPixelFormat24bppBGR, 24, bits_24bppBGR, 4, 2, 96.0, 96.0};
static const BYTE bits_32bppBGR[] = {
255,0,0,80, 0,255,0,80, 0,0,255,80, 0,0,0,80,
0,255,255,80, 255,0,255,80, 255,255,0,80, 255,255,255,80};
@ -425,5 +431,8 @@ START_TEST(converter)
test_encoder(&testdata_32bppBGR, &CLSID_WICBmpEncoder,
&testdata_32bppBGR, &CLSID_WICBmpDecoder, "BMP encoder 32bppBGR");
test_encoder(&testdata_24bppBGR, &CLSID_WICPngEncoder,
&testdata_24bppBGR, &CLSID_WICPngDecoder, "PNG encoder 24bppBGR");
CoUninitialize();
}