jpeglib functionalities implemented by Qt
-
I have compressed jpeg file by standard jpeglib library in C++. I do not know whether there is qt functionalities which might be used to decompress jpeg files instead of using jpeg_start_decompress(...), jpeg_read_scanlines(...) etc. Are there some functionalities for that?
-
Hi
What you mean by decompress ?
QPixmap and QImage can load jpeg files directly.
Is it a special jpeg file ? -
The rough outline of a JPEG compression operation is:
Allocate and initialize a JPEG compression object
Specify the destination for the compressed data (eg, a file)
Set parameters for compression, including image size & colorspace
jpeg_start_compress(...);
while (scan lines remain to be written) jpeg_write_scanlines(...);
jpeg_finish_compress(...);
Release the JPEG compression objecthttps://www4.cs.fau.de/Services/Doc/graphics/doc/jpeg/libjpeg.html
-
@Tamis2018
Ok, let me rephrase it.
You just want to load a normal jpeg in Qt and display it ?
The format is fully supported and Qt can just load it in one
line.
http://doc.qt.io/qt-5/qtimageformats-index.html
so unless you want to do something special while decompressing
im not sure why you cant just use the QPixmap or QImage ?