[Qt-qml] How to animate a sequence of png images
Andrew.Ratcliff at nokia.com
Andrew.Ratcliff at nokia.com
Thu Sep 9 12:29:08 CEST 2010
Hi Michael
Hadn't come across mng format before but that has done the trick thanks.
FYI to make mng format from transparent png files:
http://social.msdn.microsoft.com/Forums/en-US/hddvd/thread/90c3d6de-2613-4372-84fd-b1921c45a6d5
I found that using ImageMagick was the least painless of several programs I tried. You can download it at http://www.imagemagick.org/.
First, navigate to the ImageMagick folder via the command prompt and then to convert PNGs to MNGs type:
convert -delay 10 "<path to PNGs>*.png" "<path to put MNG>\<MNG Name>.mng"
The delay there adds a delay between frames so the animations aren't as fast. It's an optional flag. Also, if you're using PNGs with transparent backgrounds, try doing:
convert -delay 10 -dispose 2 "<path to PNGs>*.png" "<path to put MNG>\<MNG Name>.mng"
The dispose flag does the following:
Undefined 0 No disposal specified (usually equivalent to 'none').
None 1 Do not dispose between frames. Just layer the next frame.
Background 2 Overwrite the frames area with the background color.
Previous 3 Overwrite the frames area with what was there prior to overlaying.
Cheers
Andy
From: Brasser Michael (Nokia-MS-Qt/Brisbane)
Sent: 09 September, 2010 10:11
To: Ratcliff Andrew (Nokia-MS/Oulu)
Cc: Qt-qml at trolltech.com
Subject: Re: [Qt-qml] How to animate a sequence of png images
AnimatedImage provides support for mng and animated gifs, if either of those is an option for you.
Regards,
Michael
On 09/09/2010, at 4:12 PM, ext Andrew.Ratcliff at nokia.com<mailto:Andrew.Ratcliff at nokia.com> wrote:
Hi all,
What is the best way to animate a looping sequence of 30 or so transparent png images in QML?
Cheers
Andy
<ATT00001..txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100909/56132ebe/attachment.html
More information about the Qt-qml
mailing list