Results 1 to 6 of 6

Thread: speed up my imagemagick/qt editor

  1. #1
    Join Date
    Feb 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default speed up my imagemagick/qt editor

    i have a Qt application that uses imagemagick to edit the image. it works but the processing is very slow. i first display the image using QLabel (QImage and QPixmap), then get the filename to create a Magick::Image, convert to Magick::Blob, edit it, and converting it back to QPixmap and display in the label.

    the problem is its slow. for example if i were to apply a blur effect to 1024x768 image it takes about 5 seconds to complete. this is very slow. the same goes for flipping or rotating images. zooming images as well. i really want to speed up this application. i am mighty interested for optimization advices. thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: speed up my imagemagick/qt editor

    I would use a profiler (or at least clock() function) to see where exactly the time is spent.

  3. #3
    Join Date
    Feb 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: speed up my imagemagick/qt editor

    hm, yes i would like to try that, could you elaborate on that concept?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: speed up my imagemagick/qt editor


  5. #5
    Join Date
    Apr 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: speed up my imagemagick/qt editor

    hi, everybody
    i m trying to read dpx image through IM, but failed to do so .
    any help would be appreciated.
    my code:
    Image image;
    Blob blob;
    QFileInfo fileInfo(file);
    //read the file data
    image.read(filename.toStdString());
    image.write(&blob);
    const QByteArray imageData((char *)blob.data(),blob.length());
    QPixmap pixmap;
    pixmap.loadFromData(imageData);

  6. #6
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: speed up my imagemagick/qt editor

    If the application of the blur is what's taking all the time, the problem lies with ImageMagick; there is nothing you can do within Qt that will have any impact on ImageMagick performance.

    You should determine where, exactly, your program is spending its time. Use of a profiler, already mentioned, will be useful. Simply dumping print statements to the console periodically ("file opened...file read...image created...image processed...etc) will also give you a feel for which steps are taking the longest.

Similar Threads

  1. Help using the QTreeWidget persistent editor.
    By Billy Lee Black in forum Qt Programming
    Replies: 13
    Last Post: 18th July 2007, 19:59
  2. Model/View: Custom Persistent Editor
    By No-Nonsense in forum Qt Programming
    Replies: 2
    Last Post: 7th February 2007, 14:55

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.