Results 1 to 1 of 1

Thread: QImage convertToFormat dithering issue

  1. #1
    Join Date
    Feb 2016
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default QImage convertToFormat dithering issue

    Hello,
    In my project I need to convert an image to one that is made up of a max of 144 predetermined colors. I created a colorTable with all 144 QRgb values. However upon converting the format, dithering isn't working if I specify a colorTable.

    Qt Code:
    1. convImage = sourceImage.convertToFormat(QImage::Format_Indexed8, colorTable, Qt::DiffuseDither);
    To copy to clipboard, switch view to plain text mode 

    The resulting image is the exact same as if I were to use ThresholdDither. If I run the same function without specifying a colorTable, dithering works perfectly.

    EDIT: I now see in the docs that dithering is disabled for indexed images. I reallllly need a workaround then. Any ideas?
    Last edited by oPryzeLP; 13th February 2016 at 21:32.

Similar Threads

  1. Issue with QImage::loadFromData.
    By nguafacki in forum Newbie
    Replies: 1
    Last Post: 7th June 2013, 04:14
  2. Dithering
    By rubikon in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 26th November 2010, 16:28
  3. IplImage to QImage memory issue
    By p3l-outrepid in forum Qt Programming
    Replies: 1
    Last Post: 12th May 2010, 10:35
  4. QImage Format Issue
    By vishal.chauhan in forum Qt Programming
    Replies: 7
    Last Post: 9th March 2007, 11:14
  5. QImage Issue
    By vishal.chauhan in forum Qt Programming
    Replies: 5
    Last Post: 5th February 2007, 05:29

Tags for this Thread

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.