QImage rotate for tiff images
I used the following code to rotate and flip. I find huge data loss in .tiff and .jpeg images of larger size.
Is there any approach in QT or any other external QT/ C++ library to over come the issue.
////////rotate/////////
Code:
QTransform myTransform;
myTransform.rotate(90);
myImage = myImage.transformed(myTransform);
bool ret = myImage.save(currentFile);
////////////////flip////////////
Code:
myImage = myImage.mirrored();
bool ret = myImage.save(currentFile);
thank you
Re: QImage rotate for tiff images
What kind of "loss" are you talking about? TIFF is a lossless format, it shouldn't lose any information from the image.
Re: QImage rotate for tiff images
1) The file size reduces for jpeg and increases for tiff image files. The file size of 3.27 jpeg image becomes, 1.1Mb and the file size of 35Mb of tiff becomes 47.2Mb.
2) If the program performanes, do (rotate) and undo of same file repeatedly, the original file is not restored.
Thank you
Re: QImage rotate for tiff images
Quote:
Originally Posted by
jessiemmichael
1) The file size reduces for jpeg and increases for tiff image files. The file size of 3.27 jpeg image becomes, 1.1Mb and the file size of 35Mb of tiff becomes 47.2Mb.
2) If the program performanes, do (rotate) and undo of same file repeatedly, the original file is not restored.
Both of these are perfectly normal since both file formats use compression