Results 1 to 2 of 2

Thread: Get image size

  1. #1
    Join Date
    Dec 2010
    Location
    Tarnów, Poland/Polska
    Posts
    14
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Get image size

    So, I need to get image size which is located on website. It can be http://www.google.pl/intl/pl_ALL/ima...es_logo_lg.gif for example.

    I tried QWebElement::geometry but it returns me actually size. I need real size. for example I show image 200x400 in QWebView 100x200 and image is resized to 100x200, so QWebElement::geometry returns me height 100.
    I have no idea. Help me ;]

    Sorry for my bad english, but i'm polish

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: Get image size

    The only way I know would be to download the image in to QImage and get the size from QImage.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Image - screen size
    By ahmdsd_ostora in forum Qt Programming
    Replies: 2
    Last Post: 11th July 2010, 15:29
  2. Max size of image file
    By Astrologer in forum Qt Programming
    Replies: 1
    Last Post: 28th April 2010, 13:39
  3. Image Size Not Right
    By QbelcorT in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 7th April 2009, 09:11
  4. icon size and the image
    By zgulser in forum Qt Programming
    Replies: 0
    Last Post: 13th March 2009, 13:03
  5. [QT4] QtextBrowser and image size (win)
    By sebgui in forum Qt Programming
    Replies: 0
    Last Post: 28th March 2006, 21:01

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.