How to store a image quickly?
-
Recently I am writing a program to generate a 1920*1080 image,but I find that to use QImage::save() method costs like 0.44s to store a pic,so is there any way to save images more quickly in Qt?Should I try to use a QDataStream to write data to a QFile?
-
@MartinChan-0 How exactly are you storing the image? What is the device where you store it (hard-disk, SSD,...)?
-
@MartinChan-0 You actually didn't answer any of my questions.
How do you know that QImage::save() takey 0.44sec? How did you measure? -
Sorry...I use qt_windows.h functions "QueryPerformanceCounter" to calculate it.
-
Hi,
What image format are you using to save your images ?
-
Well, you are using an format that requires compression so you have to benchmark a bit more. IIRC, there's an implementation of the jpeg library call libjpeg-turbo that should be faster but you will have to re-built the jpg image plugin yourself to make use of it.