Results 1 to 2 of 2

Thread: QPixmap/QImage How to enlarge a picture

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    73
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    16
    Thanked 3 Times in 3 Posts

    Default QPixmap/QImage How to enlarge a picture

    Hello,
    The scaled function of the QPixmap class works fine to shrink a picture but is not very good to enlarge a picture. For instance, let's say my thumbnail is 100X100 and I would like to double it; the final picture is of pretty low quality.
    Is there a function in Qt to make that extrapolation better?
    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    3
    Thanked 39 Times in 39 Posts

    Default Re: QPixmap/QImage How to enlarge a picture

    You will always lose out on quality when enlarging pixmaps. The best way I can come up with is either DIY, or ensure that you've set the transformation mode to SmoothTransformation in the scaled() call.

  3. The following user says thank you to e8johan for this useful post:

    jcr (22nd June 2006)

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.