The documentation for Qt says that QImageWriter has a setCOmpression method and that this method depends on the chosen image format. For example, for tiff images, 0 means no compression and 1 means LZW compression. By the same token, I am setting my format to dds then call this method as follows;
QImageWriter writer(dir);
writer.setFormat("dds");
writer.setCompression(5);
bool saved = writer.write(image);
image
is a QImage variable of course. But there is no compression in my resulting image. I use ImageMagick to manually compress and compressed image has lower size. Qt outputs a dds file but it is not compressed. So how can I set the compression. I chose 5 as a parameter expecting that it would set compression level to DXT5.