PDA

View Full Version : png not support animation in QT4.6



sophister
9th December 2009, 14:29
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#.

wysota
9th December 2009, 17:02
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?

Kronen
9th December 2009, 17:06
http://www.qt-apps.org/content/show.php/Apng+Video+Frame+Label?content=82221

sophister
10th December 2009, 11:56
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.

wysota
10th December 2009, 12:08
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.

sophister
10th December 2009, 12:56
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.

wysota
10th December 2009, 13:04
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.