Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-15762

QImageReader::imageCount() returns an improper number of frames for a multi-image MNG file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 4.7.1
    • Image formats
    • 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

      Attachments

        1. Delta-gray-a8b.mng
          11 kB
        2. QTBUG15762.7z
          49 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            alexex Letov Alexey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes