Results 1 to 3 of 3

Thread: QPainter doing a distortion in drawed pixmap

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Unhappy QPainter doing a distortion in drawed pixmap

    Hello!

    I'm facing a strange problem with QPainter::drawPixmap usage. To use my debug situation, I downloaded a common-random bitmap (.bmp) from the web into my PC and put it in a subdirectory. If I call QPixmap::drawPixmap with a unaltered QPixmap created with the bitmap's file, it is drawed correctly on screen.

    The problem is that I need to do some edittings on it and for that I'm using GIMP (I'm working in Linux). So, if I do such edittings (and, in accordance to my tests, actually any edit at all with GIMP) and then I try to print the image again using the same code, I get a blue-unchanged image instead o.O

    Here is a print screen comparing the changed file with the original one:

    asdasda.png

    And here a print of the two files in the system folder, in the same order:

    ddddd.png

    At least visually one can see that is not GIMP who is distorting the image (and I actually found no reason for believing so).



    I'm glad for any help in trying to solve this problem!

    Momergil


    ------
    Edit: Now I did other tests and I'm beginning to think that it's GIMP fault (while I don't have here any other image editor for linux to do the final checking and don't know which to download). Here are two other images comparing what I got and what Qt shows:

    A.png

    And in the directory:

    B.png

    The most interesting here is the last files, when I just opened the image in GIMP and clicked int File->Overwrite (without any edit) and this was enough for QPainter to draw the pixmap with that "blue color effect" :/
    Last edited by Momergil; 11th July 2014 at 18:27.
    May the Lord be with you. Always.

Similar Threads

  1. QPainter over Pixmap problem
    By seany in forum Qt Programming
    Replies: 3
    Last Post: 16th June 2013, 19:18
  2. Replies: 1
    Last Post: 27th April 2012, 15:01
  3. QPainter::begin: Cannot paint on a null pixmap
    By sabeesh in forum Qt Programming
    Replies: 5
    Last Post: 27th July 2010, 18:03
  4. QPainter ouside of paintEvent with a pixmap
    By bitChanger in forum Qt Programming
    Replies: 10
    Last Post: 22nd March 2006, 19:45

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.