Win a copy of Securing DevOps this week in the Security forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

.jpg file, matrix preRotation, and saving file being much larger than original  RSS feed

Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a .jpg on the android file system of size 509,977 bytes. After i read that in

I create a Matrix operation to rotate that image

If I save this rotated file to the file system, the file has grown to 1,561,865 bytes.

Interestingly enough, on Windows 7 and using its "Windows Photo Viewer" and choosing "Rotate Clockwise", the image (with original size of 509,977 bytes) is now the size of 701,722 bytes. Interestingly enough, using GIMP and rotating 90 degrees clockwise and saving produces a .jpg file the size of 1,205,091 bytes.

Any idea why the very large increase in size for Android using the code operations above? Any other options I can use to keep the file size down but still keep the same clarity?

Much thanks,
I am mighty! And this is a mighty small ad:
Thread Boost - a very different sort of advertising
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!