INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Auto (EXIF-based) rotate JPEG  (Read 2801 times)

leoric

  • World Citizen
  • ***
  • Posts: 164
Auto (EXIF-based) rotate JPEG
« on: December 30, 2008, 08:49:27 am »

I'm just wondering if there are any reason not to implement one easy, but very useful feature - automatically (i.e. based on EXIF orientation) do lossless rotation of jpeg files - by request or during import? To be clear - I mean not to display it using right orientation, but physically rotate file. This is because when I need to share file in some way, it would better if it rotated properly.
Or may be I miss something and MC already has some way to accomplish this task?
For now I'm using 3rd party tool to do this so I need to run it manually each time after I've uploaded new photos to pc.
Thanks in advance for response!
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: Auto (EXIF-based) rotate JPEG
« Reply #1 on: December 30, 2008, 08:57:32 am »

Most modern software (including Media Center) will display the image correctly using the EXIF orientation.

One thing you could do is make a smartlist like [Rotation]=[90], pick all the images, and rotate them in one shot.  This will clear the rotation and remove them from the smartlist.
Logged
Matt Ashland, JRiver Media Center

leoric

  • World Citizen
  • ***
  • Posts: 164
Re: Auto (EXIF-based) rotate JPEG
« Reply #2 on: December 30, 2008, 09:13:20 am »

Hm...  Unfortunately, basic soft that used by many of non-advanced users still do not handles orientation correctly. Examples are - thumbnails in Windows Explorer, Windows Photo Gallery, ... Also there are a lots of web sites that don't rotates uploaded images automatically. UPD:  ...and when MC resizes images for uploading, EXIF removed, so in any case web galleries have nothing to deal with :(
Anyway thanks for fast response and some kind of solution. It's pretty easy to create 2 smartlists (for 90 and 270), but I still need to make some actions each time I got new photos :(
BTW, I've a thought about how MC handle jpegs that it cannot rotate losslessly - they are rotated with reencoding or cropped to be lossless-rotated?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72439
  • Where did I put my teeth?
Re: Auto (EXIF-based) rotate JPEG
« Reply #3 on: December 30, 2008, 09:38:13 am »

jpg rotation is lossless in MC.
Logged

leoric

  • World Citizen
  • ***
  • Posts: 164
Re: Auto (EXIF-based) rotate JPEG
« Reply #4 on: December 30, 2008, 09:59:30 am »

jpg rotation is lossless in MC.
I see, but what happened if (by some reason) image dimensions are not divided by 8? Tool that I use now to auto-rotate asks me to crop image. I understand that it's a rare case but it's just my habit to know all nuances of soft usages...
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: Auto (EXIF-based) rotate JPEG
« Reply #5 on: December 30, 2008, 11:33:34 am »

I see, but what happened if (by some reason) image dimensions are not divided by 8?

Our lossless rotator is based on the IJG code, which I believe is considered the standard.  For the rotation transformation to be lossless, it may crop a little in the case of non-divisible by 8 dimensions.

For example, I just rotated a 17x9 JPEG and the output it 9x16.
Logged
Matt Ashland, JRiver Media Center

park

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2358
  • I wish I had more to say!
Re: Auto (EXIF-based) rotate JPEG
« Reply #6 on: December 30, 2008, 11:34:05 am »

Landscape photos that I sent from MC to a handheld folder (on my server) and then synched to my iphone (using itunes) have been doubly rotated out of whack. Is this MC's fault, or is itunes doing something weird when it says "processing images for iphone"? I thought that meant that it was just resizing them, but could it be that both MC and itunes are rotating the images?
Logged

leoric

  • World Citizen
  • ***
  • Posts: 164
Re: Auto (EXIF-based) rotate JPEG
« Reply #7 on: December 30, 2008, 01:36:38 pm »

Our lossless rotator is based on the IJG code, which I believe is considered the standard.  For the rotation transformation to be lossless, it may crop a little in the case of non-divisible by 8 dimensions.
Thanks, it's clear for now.
One more. I was playing with lossless rotations and have came into another one strange issue with it. When I use any other than MC tool to do rotation (in fact, I've used 2 different freeware app), original image file size equals to file size of image that is rotated two times - left and then back right. But when I use MC to do this, file size is slightly differ after same operations - about 40-80 kb greater, than original. And one more wonder - if I perform such operations after MC using other tool, file size is equal to original again! My first thought was that this is caused by MC tags, but I've checked it and there wasn't any changes in tags after rotation using other tool. I'm stuck in thinking about possible reason of such behavior ?
Logged
Pages: [1]   Go Up