Results 1 to 3 of 3

Thread: Change a black pixel to a blue pixel in an image

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Change a black pixel to a blue pixel in an image

    While the use of integers to initialise a QRgb looks odd it is correct language-wise. QRgb is a typedef equivalent to unsigned int.

    It is not working as expected because setting the value this way has set the alpha channel to 0: the colour exists but is 100% transparent and will not match an opaque black/blue pixel. Try setting the colours using the qRgb() macro or, as KillGabio suggests, using symbolic names.
    Last edited by ChrisW67; 17th February 2012 at 05:08.

Similar Threads

  1. Replies: 3
    Last Post: 25th September 2011, 11:04
  2. Replies: 2
    Last Post: 10th June 2011, 14:16
  3. Select pixel from image
    By sergio87 in forum Qt Programming
    Replies: 4
    Last Post: 2nd May 2011, 11:48
  4. QPixmap pixel by pixel ?
    By tommy in forum Qt Programming
    Replies: 19
    Last Post: 3rd December 2007, 22:52
  5. how change the QListBox item position by pixel
    By roy_skyx in forum Qt Programming
    Replies: 2
    Last Post: 20th January 2006, 01:34

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.