Results 1 to 7 of 7

Thread: png not support animation in QT4.6

  1. #1
    Join Date
    Apr 2009
    Location
    China
    Posts
    127
    Thanks
    30
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question png not support animation in QT4.6

    Problems are always endless.....
    I add a resource file in the Qt creator, and adding a png picture into the qrc file, it doesn't show. And when I try to open it using QImageReader, it report an error that the file does not exists. But when I add a jpg picture into the qrc file, it shows perfectly well.

    Thanks in advance!!

    I have reduced the width of my png file, and it shows well in Qt's qrc file. It seems that Qt does not support png files whose width is too large, 2860 × 84 cannot be read in, for instance.

    But it really puzzles me a lot that Qt does not support png picture with animation, while other languages do well on that, say C#.
    Attached Images Attached Images
    Last edited by sophister; 9th December 2009 at 14:58.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: png not support animation in QT4.6

    Quote Originally Posted by sophister View Post
    But it really puzzles me a lot that Qt does not support png picture with animation, while other languages do well on that, say C#.
    1. Qt is not a language
    2. On what do you base your assumption that Qt doesn't support animated PNG files?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Oct 2009
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: png not support animation in QT4.6


  4. #4
    Join Date
    Apr 2009
    Location
    China
    Posts
    127
    Thanks
    30
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: png not support animation in QT4.6

    Oh, it's an oral slip.
    cause I have use QMovie::supportedFormats()to show the suppoted formats, and it shows only gif and mng. maybe I have done something wrong to see the supported formats.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: png not support animation in QT4.6

    MNG is animated PNG, the standard one. To support APNG (which is probably what you want) you need a patched png library. Without it no language nor binding will support APNG because it's not standard. Qt has nothing to do with it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. The following user says thank you to wysota for this useful post:

    sophister (10th December 2009)

  7. #6
    Join Date
    Apr 2009
    Location
    China
    Posts
    127
    Thanks
    30
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: png not support animation in QT4.6

    Thank you!
    You mean I have to add another library which supports APNG into my project ?
    And what do I need to do is I want to show that png file with animation in QT? I have no idea.

  8. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: png not support animation in QT4.6

    I mean you have to substitute libpng that is in your system with one that supports APNG. Or you can just convert your animation to MNG and use that.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. The following user says thank you to wysota for this useful post:

    sophister (10th December 2009)

Similar Threads

  1. Installation Problem
    By QbelcorT in forum Installation and Deployment
    Replies: 4
    Last Post: 22nd April 2010, 09:04
  2. Qt 4.4.3 commercial on Kubuntu 8.10
    By Micawber in forum Installation and Deployment
    Replies: 5
    Last Post: 17th February 2010, 01:02
  3. Qt/X11 source-distro apps corrupting KDE Desktop background
    By wdezell in forum Installation and Deployment
    Replies: 5
    Last Post: 23rd July 2009, 21:10
  4. Qt-4.4.0 installation error in linux
    By babu198649 in forum Installation and Deployment
    Replies: 4
    Last Post: 27th May 2008, 14:35
  5. Access to PostgreSQL DB on a linux server
    By rmagro in forum Qt Programming
    Replies: 28
    Last Post: 13th March 2008, 09:02

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.