Hi,
I'm not able to save a pixmap data to jpeg format. but if I opt of png then it works. what am I missing here?

Note: I have my Qt built statically and thats when all this kind of wierd problems are showing up.

here is my code:

Qt Code:
  1. originalPixmap = QPixmap::grabWindow(QApplication::desktop()->winId());
  2. screenshotLabel->setPixmap(originalPixmap.scaled(screenshotLabel->size(),
  3. Qt::KeepAspectRatio,
  4. Qt::SmoothTransformation));
  5. QString format = "jpeg";
  6. QString initialPath = QDir::currentPath() + tr("/imagecapture/untitled.") + format;
  7. QString fileName = initialPath;
  8. if (!fileName.isEmpty())
  9. originalPixmap.save(fileName, format.toAscii());
To copy to clipboard, switch view to plain text mode 

thanks,