PDA

View Full Version : Moving images and change their DIP



yazwas
26th October 2009, 16:13
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

wysota
26th October 2009, 17:46
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.