Results 1 to 6 of 6

Thread: comparison of two pixmap images

  1. #1
    Join Date
    Dec 2006
    Posts
    123
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default comparison of two pixmap images

    hi,

    i have an application wherein i need to compare two images and do some action based on the outcome.can anyone say me whether is there any class or built-in function for this ?

    thanks in advance,

    saravanan.

  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: comparison of two pixmap images

    No, there isn't.
    You can start by comparing their sizes. Next, if they are equal, you have to start comparing them pixel by pixel.

    An easier and faster solution is to convert the pixmaps to QImage( if they are QPixmaps) and use QImage::scanLine to retrieve lines from the two images and compare them with memcmp.

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: comparison of two pixmap images

    J-P Nurmi

  4. #4
    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: comparison of two pixmap images

    What if one of the images is too big to be stored in the pixmap cache?

  5. #5
    Join Date
    Jan 2006
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: comparison of two pixmap images


  6. #6
    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: comparison of two pixmap images

    He's using Qt 3.

    EDIT: oh, that's in Qt 3 too.

Similar Threads

  1. Replies: 10
    Last Post: 1st February 2006, 10:08

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.