Results 1 to 2 of 2

Thread: QImage

  1. #1
    Join Date
    Jul 2010
    Posts
    72
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    35

    Default QImage

    Hello,

    I am trying to do pixel manipulation. I have created an image object and set all its pixels to a certain qRgba colour. I used the following code to do so:

    QImage image;
    image = QImage(100, 100, QImage::Format_ARGB32);
    image.fill(qRgba(0, 100, 100, 1));

    How do I vizualize this image?

    Thank you

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: QImage

    There are many ways but the easiest would be to use a QLabel and set the image on it. (see setPixmap())

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

    Maluko_Da_Tola (1st August 2010)

Similar Threads

  1. QImage and Qt 4.5.3
    By halmassi in forum Newbie
    Replies: 26
    Last Post: 10th March 2010, 21:49
  2. What's faster: QPixmap-to-QImage or QImage-to-QPixmap
    By forrestfsu in forum Qt Programming
    Replies: 2
    Last Post: 15th December 2006, 17:11
  3. QImage
    By mickey in forum Qt Programming
    Replies: 7
    Last Post: 14th July 2006, 21:54
  4. QImage Help Pls
    By munna in forum Newbie
    Replies: 4
    Last Post: 5th June 2006, 12:02
  5. Replies: 3
    Last Post: 15th March 2006, 11:44

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.