Results 1 to 2 of 2

Thread: Automatic image resizing too slow

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Oct 2009
    Location
    Mexico
    Posts
    81
    Thanks
    6
    Thanked 10 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Automatic image resizing too slow

    According to Qt Documentationo of QWidget::resizeEvent
    The widget will be erased and receive a paint event immediately after processing the resize event. No drawing need be (or should be) done inside this handler.

    you don't mencioned in what function scale the pixmap, if the pixmap is called in the funtion resize event, MAYBE that is the problem. indirectly you enforce a redraw of the widget, but i need see the your source code.

    try to use Qt::FastTransformation instead of Qt::SmoothTransformation.
    Qt Code:
    1. imageContainer->setPixmap(pix.scaled(sizex, Qt::KeepAspectRatio, Qt::FastTransformation));
    To copy to clipboard, switch view to plain text mode 

    Another detail. resizeEvent is a event not a Qt signal. Signals are useful when using a widget, whereas events are useful when implementing a widget.

    sorry my poor english. my natural lenguege is spanish
    Last edited by ecanela; 14th December 2009 at 08:24. Reason: updated contents

Similar Threads

  1. resizing an image without interpolation
    By mattei in forum Qt Programming
    Replies: 3
    Last Post: 9th December 2009, 11:10
  2. Very slow repainting ofPixmaps in QGraphicsView images
    By drexiya in forum Qt Programming
    Replies: 3
    Last Post: 21st October 2009, 18:13
  3. can Qlabel display a series of image one by one ?
    By jirach_gag in forum Qt Tools
    Replies: 3
    Last Post: 11th August 2008, 15:36
  4. Finding marks on scanned image for alignment
    By caduel in forum Qt Programming
    Replies: 1
    Last Post: 23rd September 2007, 02:10
  5. Automatic Resizing
    By ToddAtWSU in forum Qt Programming
    Replies: 7
    Last Post: 22nd January 2007, 18:41

Tags for this Thread

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.