I need to convert an Raw image buffer into a jpg image buffer.
At the moment, I do this operation in the following way:
QImage tmpImage
= QImage(rawImgBuffer, img_width, img_height, image.format ); //image.format=RGB888
QBuffer bufferJpeg(&ba);
bufferJpeg.open(QIODevice::WriteOnly);
tmpImage.save(&bufferJpeg, "JPG");
QByteArray finalJpgBuffer = bufferJpeg.data();
It works fine but the cpu load is too high (I have a lot of threads that do this operation a lot of time each second). Reading the Qt documentation I found this article: Hardware Acceleration & Embedded Platforms. If i understood, I can use the QPainter class to execute gpu operations... Is it possible to do this convertion (from raw to jpg) using this class? (or another similar Qt class that use hardware acceleration (gpu))!!
My application need to be platform indipendent.
Thanx at all.