Author Topic: Rotating pictures  (Read 858 times)

0 Members and 1 Guest are viewing this topic.

Offline artagTopic starter

  • Super Contributor
  • ***
  • Posts: 1194
  • Country: gb
Rotating pictures
« on: August 10, 2024, 02:09:26 pm »
I uploaded a photo in portrait format (because that was the shape of the object) and it was displayed on the forum in landscape, ie on it's side. So I rotated it with xv and uploaded it again. It was still on its side.

Does the forum software try to repair phone images ? A good aim but not really viable. Or is ther some property of the photo that isn't corrected by modifying the file ?
 

Offline The Soulman

  • Frequent Contributor
  • **
  • Posts: 994
  • Country: nl
  • The sky is the limit!
Re: Rotating pictures
« Reply #1 on: August 10, 2024, 02:19:23 pm »
This have been discussed before, don't remember the exact details but it had to do how devices "rotate" image's before upload.
There are multiple ways to rotate, actually rotating the image file (cpu intensive) or placing a note in the metadata "this side up" (not cpu intensive), there could be more ways.  :-//

The combination of the different methods and how they are handled on different devices makes for a big mess with various and sometimes unpredictable results.
 

Offline RAPo

  • Frequent Contributor
  • **
  • Posts: 741
  • Country: nl
Re: Rotating pictures
« Reply #2 on: August 10, 2024, 02:20:29 pm »
maybe there is still some exif info in the image try removing that
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1319
  • Country: pl
Re: Rotating pictures
« Reply #3 on: August 10, 2024, 05:40:52 pm »
The forum doesn’t modify files in any way. The image you see is the exact image you uploaded.

The difference may come from how software on your device decides to render the image. It may either tries to be “smart” or applies EXIF orientation, or your browser applies EXIF orientation while the other software does not.
(deleted: see below)
« Last Edit: August 11, 2024, 02:38:04 am by golden_labels »
People imagine AI as T1000. What we got so far is glorified T9.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7040
  • Country: pl
Re: Rotating pictures
« Reply #4 on: August 10, 2024, 07:28:33 pm »
The forum does modify image uploads. All images in common formats are re-encoded at a preset and not-so-great compression level (which typically results in smaller size, though sometimes in larger if the original was highly compressed) and EXIF tags are stripped from JPEG images, supposedly for privacy reasons (various not-so-obvious but highly specific metadata).

How it matters for orientation, see here.
 
The following users thanked this post: thm_w, edavid, golden_labels

Offline Whales

  • Super Contributor
  • ***
  • Posts: 2009
  • Country: au
    • Halestrom
Re: Rotating pictures
« Reply #5 on: August 10, 2024, 10:10:13 pm »
+1 the forum definitely modifies uploaded images.  Sometimes it compresses them worse (bigger file size) than what I uploaded :D

The only compatible way to rotate an image is to rotate the pixel content, not add a rotation EXIF tag.  Sadly the only lossless way of rotating an image is to use an EXIF tag, not rotate the pixel content.  But the forum isn't lossless (as previously stated) so it's not worth chasing that dream.
 
The following users thanked this post: tooki

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12383
  • Country: ch
Re: Rotating pictures
« Reply #6 on: August 10, 2024, 11:19:53 pm »
I’ll also note that the forum software breaks animated GIFs on upload — it re-encodes them, but the first frame only. All animation is lost.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7040
  • Country: pl
Re: Rotating pictures
« Reply #7 on: August 11, 2024, 08:00:15 am »
Sadly the only lossless way of rotating an image is to use an EXIF tag, not rotate the pixel content.  But the forum isn't lossless (as previously stated) so it's not worth chasing that dream.
See my link, you can rotate many JPEGs losslessly, or all of them if you don't mind discarding a few pixels along the edges.

The forum can be made lossless by uploading the image in a ZIP archive, but that makes it a little harder to view ;)

edit
And by the way, the forum's image "optimizer" plugin is sloppy and the attachment size that you see is the size of the file originally uploaded, not the one that you actually download from the server ::) This may make some people believe that they are downloading their original images, but they are not.
« Last Edit: August 11, 2024, 08:24:31 am by magic »
 
The following users thanked this post: tooki


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf