Skip to content

Commit 90da5bf

Browse files
committed
Add animated webp test image that is not decoding properly and a unit test.
1 parent f351820 commit 90da5bf

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

UnitTests/Src/TestImage.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ tTestUnit(ImageLoad)
9999
tImageTIFF imgTIFF("TestData/Images/Tiff_NoComp.tif");
100100
tRequire(imgTIFF.IsValid());
101101

102-
tImageWEBP imgWEBP("TestData/Images/RockyBeach.webp");
102+
tImageWEBP imgWEBP("TestData/Images/WEBP/RockyBeach.webp");
103103
tRequire(imgWEBP.IsValid());
104104
}
105105

@@ -443,7 +443,7 @@ tTestUnit(ImagePicture)
443443
tRequire( tSystem::tFileExists("WrittenTiff_ZIP.tif"));
444444

445445
tImageWEBP webp;
446-
webp.Load("RockyBeach.webp");
446+
webp.Load("WEBP/RockyBeach.webp");
447447
webp.Save("WrittenRockyBeach.webp");
448448
pic.Set(webp); tga.Set(pic);
449449
tga.Save("WrittenRockyBeach.tga");
@@ -1296,6 +1296,12 @@ tTestUnit(ImageMultiFrame)
12961296
tiffDst1.Save("TestData/Images/Demux_Confused.tiff");
12971297
tRequire(tSystem::tFileExists("TestData/Images/WrittenDemux_Confused.tiff"));
12981298
return;
1299+
1300+
// Test loading an animated webp and saving as multpage tiff.
1301+
tImageWEBP webpSrc("TestData/Images/WEBP/AnimatedTest.webp");
1302+
tImageTIFF tiffDst2(webpSrc.Frames, true);
1303+
tiffDst2.Save("TestData/Images/WrittenAnimatedTestManyFrames.tiff");
1304+
tRequire(tSystem::tFileExists("TestData/Images/WrittenAnimatedTestManyFrames.tiff"));
12991305
#endif
13001306

13011307
tImageTIFF tif;

UnitTests/Src/UnitTests.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ int main(int argc, char** argv)
217217
// tTest(ImageLoad);
218218
// tTest(ImageSave);
219219
// tTest(ImageTexture);
220-
// tTest(ImageMultiFrame);
221-
tTest(ImagePicture);
220+
tTest(ImageMultiFrame);
221+
// tTest(ImagePicture);
222222
// tTest(ImageQuantize);
223223
// tTest(ImagePalette);
224224
// tTest(ImageFilter);
36.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)