QImage::save() doesn't get the raw bytes of the image, it converts the image to a file format.
If you really want the raw bytes, do something like
QByteArray ba((const char *)preview.constBits(), preview.byteCount());
@SGaist Thank you for your suggestion. I would like to know anyone particularly used Qt for Electronic paper Display. If yes, then I would like to get the difference if any.
I believe the users can give suggestion.
Meanwhile, I will post the same in interest mailing list also.