Results 1 to 2 of 2

Thread: QImage

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2007
    Posts
    166
    Thanks
    25
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QImage

    Hi,
    I have a code in QT-3 like this
    new QImage(vid_io_buffer + vid_io_offsets[u], w, h, 32, 0, 0, QImage::IgnoreEndian);

    how can I create it in QT-4
    my problum is in 5th and 6 th arguments. 0,0;
    I try it like this

    QImage(vid_io_buffer + vid_io_offsets[u], w, h, 32, QImage::Format_RGB32);
    then, how can i set the QRgb * colortable, int numColors. In first line it is 0,0.
    Please help me...

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QImage

    Why do you need those parameters? you passed NULL/0 anyway.
    You can pass one of the available formats to the QImage constructor, to specify what colorspace your image is. For instance, you can pass QImage::Format_RGB32 or Format_Mono.

Similar Threads

  1. [Qt4] How to load Url image into QImage?
    By Gonzalez in forum Qt Programming
    Replies: 6
    Last Post: 13th October 2014, 10:10
  2. Replies: 12
    Last Post: 7th September 2011, 16:37
  3. QImage loadFromData not run... XPDF data
    By patrik08 in forum Qt Programming
    Replies: 7
    Last Post: 24th April 2007, 11:51
  4. Creating a QImage from uchar* data
    By forrestfsu in forum Qt Programming
    Replies: 6
    Last Post: 8th February 2007, 15:21
  5. QImage constructor
    By Lele in forum Qt Programming
    Replies: 2
    Last Post: 11th January 2007, 12:06

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.