Results 1 to 2 of 2

Thread: Moving images and change their DIP

  1. #1
    Join Date
    Jul 2009
    Location
    Jordan, and UAE
    Posts
    55
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Moving images and change their DIP

    Hello All,

    I have 300 DPI images that I want to copy from one location to another, I'm using ordinary QFile::copy(...) function

    My problem is that I want to also be able to save those 300 DPI images to 100 DPI images. So I will have 2 versions of the same image but with different DIP's

    The way I do it now, is I'm loading the image, and then I use QImage::scaledToWidth(...) to scale the image to 1/3 of its size, and then saving the new image to the new location

    My question is can this be done without actually loading the image? because the images are around 5 mb each, and it take alot of time for them (when we are talking about 20-30 images) to load and save everyone

    If you have any idea, please tell me, or if you thinking that using a 3rd party libraries will be better, that is also possible,

    Thanks

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

    Default Re: Moving images and change their DIP

    You have to load the image to be able to operate on its data. Resolution of the image is not simply some attribute of the file, it involves the actual data.
    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.


Similar Threads

  1. Replies: 8
    Last Post: 8th May 2009, 09:14
  2. How can I change widget images and layouts?
    By sendyou in forum Qt Programming
    Replies: 1
    Last Post: 20th August 2008, 11:07
  3. Replies: 1
    Last Post: 5th December 2006, 11:07

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.