Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
4.7.1
-
None
-
MS Windows XP SP2, MS Visual Studio 2008
Description
QImageReader::imageCount() returns a zero count of images for multiframe MNG files (e.g. Delta-gray-a8b.mng from MNGsuite-20030305). This leads to a crash (divide by zero) in a QMngHandlerPrivate::jumpToNextImage() function. Sequential reading of images from a file is OK. videowidget.exe example also displays all file's frames properly. IMHO it is a good idea to test for a zero image count condition in the jumpToNextImage() function.
Code:
QImageReader imagereader( ".../Delta-gray-a8b.mng" ); // OK
int icnt = imagereader.imageCount(); // icnt == 0
imagereader.jumpToImage( 0 ); // OK
imagereader.jumpToNextImage(); // Crash: divide by zero exception