I have created a qt project that take screen shot of the desktop and compress it .As far as I have taken the screen shot and scaled it.The original screen shot is about 230kb size and while scaling it reduced up-to 60kb.My problem is I need to reduce the saved jpg to around 5-10kb size without loosing it's clarity of the image.I have searched for the libraries and add-on in Qt but couldn't find any one that could give the possible result Is there any algorithms ,examples or compression techniques that could reduce the size drastically without loosing its clarity? OS:Ubuntu 14.04, qt-5.2.1 .Here given below code I have done so far:
int widthToScale= (QApplication::desktop()->screenGeometry().width()*60)/100;
int heightToScale=(QApplication::desktop()->screenGeometry().width()*60)/100;
QPixmap p=QPixmap::grabWindow(QApplication::desktop()->winId(),0,0,
QApplication::desktop()->screenGeometry().width(),
QApplication::desktop()->screenGeometry().height()).scaled(widthToScale,heightToScale,Qt::KeepAspectRatio,Qt::SmoothTransformation);
p.save(localpath,0,65);