1 Attachment(s)
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#.
Re: png not support animation in QT4.6
Quote:
Originally Posted by
sophister
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?
Re: png not support animation in QT4.6
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.
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.
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.
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.