Author Topic: shocking revelation: lossless rotation is anything but, depending on resolution  (Read 2611 times)

Offline ChromeAce

  • Newcomer
  • *
  • Posts: 1
    • View Profile
If you "losslessly rotate" an image that is 480x360, the result is a 352x480 image. Why? Because 352 is divisible by 16 and 360 isn't. If it isn't divisible by 16, PM quietly trims the rest of the image and doesn't tell you. As a result, I have lost pixels I can never get back because I didn't realize this was happening.

Why do I have originals of this resolution? Got them from shared Yahoo Photos albums from family; no other way to get them from this particular source.

I would say this definitely deserves some sort of warning dialog box.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 21416
    • View Profile
    • Camera Bits, Inc.
If you "losslessly rotate" an image that is 480x360, the result is a 352x480 image. Why? Because 352 is divisible by 16 and 360 isn't. If it isn't divisible by 16, PM quietly trims the rest of the image and doesn't tell you. As a result, I have lost pixels I can never get back because I didn't realize this was happening.

Why do I have originals of this resolution? Got them from shared Yahoo Photos albums from family; no other way to get them from this particular source.

I would say this definitely deserves some sort of warning dialog box.

You're right in that images that are not an even multiple of the size of the JPEG DCT blocks will get trimmed.  This is just a function of the JPEG library (the Independent JPEG Group reference implementation) that almost every image processing application uses.  They all do this.  If you want to rotate your images and you want a guaranteed no loss of any pixels then use Save As.  You will instead have the problem that your JPEG image will get recompressed and you will lose additional image quality.

Photos straight out of the camera do not have any trimming issues.

Is it not possible to re-download the images from the server?

-Kirk