Results 1 to 3 of 3

Thread: save animate to gif

  1. #1
    Join Date
    Jan 2006
    Posts
    9
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default save animate to gif

    Hi!

    I am finish Qt application. Application to provide animate.
    The part of code for draw:
    Qt Code:
    1. class Graph : public QWidget{
    2. Q_OBJECT
    3. public:
    4. Graph( QWidget *parent=0, const char *name=0 );
    5. ...
    6. };
    7.  
    8. void Graph::paintEvent( QPaintEvent * event) {
    9. QPixmap pixmap;
    10. QRect rect = event->rect();
    11. pixmap.resize(rect.size().expandedTo(pixmap.size()));
    12. pixmap.fill("#FBFFF3");
    13. QPainter p(&pixmap,this);
    14. ....
    15. bitBlt(this, event->rect().topLeft(), &pixmap);
    16.  
    17. // Which code add to this for save picture to graphic-file?
    18. }
    To copy to clipboard, switch view to plain text mode 

    How the animate save to gif-file?

    If save to gif-file not possible, then how save series sequence
    graphic files?

    Thanks and sorry for my english.
    Last edited by Dmitry; 7th February 2006 at 15:09.

  2. #2
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: save animate to gif

    Both QPixmap and QImage have a save-method. First parameter is the filename to save to, second parameter is the filetype. For example, to save a pixmap as png: pixmap.save("filename.png", "PNG");
    It's nice to be important but it's more important to be nice.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: save animate to gif

    Quote Originally Posted by axeljaeger
    Both QPixmap and QImage have a save-method. First parameter is the filename to save to, second parameter is the filetype.
    I think that the problem was how to make an animated GIF. There is a QMovie class, but it's only for reading.

Similar Threads

  1. How to save file with QFileDialog
    By pnikolov in forum Qt Programming
    Replies: 11
    Last Post: 1st June 2012, 11:23
  2. how to save database
    By khalid_se in forum Newbie
    Replies: 7
    Last Post: 10th July 2011, 19:47
  3. read files and save the,
    By kernel_panic in forum Qt Programming
    Replies: 2
    Last Post: 4th January 2007, 07:31
  4. Save images to database
    By jnk5y in forum Qt Programming
    Replies: 4
    Last Post: 8th May 2006, 20:56
  5. What does "Save All" actually save?
    By Mariane in forum Newbie
    Replies: 7
    Last Post: 31st January 2006, 14:23

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.