Results 1 to 3 of 3

Thread: Faster way to manage an image

  1. #1
    Join Date
    Feb 2014
    Posts
    11
    Thanks
    2
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Faster way to manage an image

    Good day people
    I'm here to ask for your help on the following:
    How can I manage an image in a faster way in Qt, or even plain C++ if this is possible at all.
    Instead of creating a QGraphicsView with a QGraphicsScene and QGraphicsPixmapItem
    and update it etc... I need a way where I could alter a pixel array and update it directly as if I was poking
    inside the QGraphicsView drawing area directly... If Qt is not the tool to do that feel free to indicate
    some framework or something in which I can do this.
    I'm looking for this because I'm making a program with heavy graphics but not the kind of thing
    that QPainter draws neither I need different graphics items, I just need to be able to use this giant
    pixmap like an array and update the changes fast to the screen.
    Thanks in advance
    Last edited by vinnzcrafts; 20th May 2014 at 01:22.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Faster way to manage an image

    QImage can work on a pixel-by-pixel basis. However after doing any pixel manipulation operation you have to convert it to QPixmap and then you can display it in any way offered by Qt -- either using graphics view, a ready widget such as QLabel or your own custom widget where you do your own custom painting (which is probably most suitable to what you need however it requires the most work).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    vinnzcrafts (28th May 2014)

  4. #3
    Join Date
    Feb 2014
    Posts
    11
    Thanks
    2
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Faster way to manage an image

    Good one, I will study this through, I will probably go with with the Qt event despite being more work....
    Thanks again

Similar Threads

  1. best way to manage forms?
    By skuda in forum Qt Programming
    Replies: 4
    Last Post: 7th December 2009, 08:38
  2. Faster paintEvent
    By SailinShoes in forum Qt Programming
    Replies: 1
    Last Post: 1st October 2008, 15:25
  3. Faster code possible?
    By ShaChris23 in forum General Programming
    Replies: 1
    Last Post: 28th May 2008, 07:35
  4. faster QScrollView
    By firas in forum Qt Programming
    Replies: 2
    Last Post: 29th April 2006, 18:49
  5. How to manage QPainter?
    By Caius Aérobus in forum Qt Programming
    Replies: 3
    Last Post: 28th April 2006, 13:20

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.