Results 1 to 9 of 9

Thread: Clever image zooming. What to write in PaintEvent?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2007
    Location
    Russia, Moscow
    Posts
    21
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Clever image zooming. What to write in PaintEvent?

    Hello. I'm making a simple image (geographic map) editor for myself.
    1) I have a QScrollArea and a custom Widget inserted into the scroll area.
    2) I have a large image. 5000x5000 pixels. I read it into a QPixmap.
    3) I have a second qpixmap. i put a scaled copy of my image into that pixmap.
    in the paintevent of the widget i draw the second pixmap.

    The problem is a huge memory usage. For example if i whant a 200% zoom i make a doubled copy of my image and store it in memory together with the original image..

    Maybe there's a way to write a more efficient PaintEvent?
    Thx.
    Last edited by ModeZt; 12th December 2007 at 23:37.

Similar Threads

  1. Replies: 3
    Last Post: 11th March 2007, 13:04

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
  •  
Qt is a trademark of The Qt Company.