MAMEWorld >> The Loony Bin
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

StilettoAdministrator
They're always after me Lucky ROMS!
Reged: 03/07/04
Posts: 6472
Send PM


Hit a weird software issue yesterday...
#250957 - 04/06/11 02:40 AM


So last night I hit upon a rather strange error, and I thought I'd detail what happened:

My dad called and said: "Photoshop is opening my files but they're all rotated 90 degrees!"
Me: "Huh?"

Well, I was in the area so I drove over. Here's what I saw:
a. He was attempting to open panorama photos.
b. When opened in Photoshop CS 3, they were supposed to be approx. 16"(h) x 32"(w) canvas size (a huge resolution of 5380 x 11250 or something)
c. In the thumbnail of the image in Explorer, it would display the photo in the correct orientation
d. When opened in Photoshop, the photo would be rotated 90 degrees counterclockwise and then cropped, and pasted onto a 16 x 32 canvas - so that the left side of the 16 x 32 canvas had the right-hand part of the image (oriented incorrectly) and the right side of the image was now pure white.

Clues that steered me in the right direction:
a. The affected files turned out to all be hand-stitched panoramas (I forget using what app, maybe even Photoshop), or in other words already 'shopped.
b. All the affected images were modified starting 1/22/2011, no older panorama had any issues. Dad said he hadn't touched his photos then. Most of the affected images were on the C: drive.
c. Computer had been upgraded to Windows 7 as of 1/10/2011 or something. (I did the free labor)
d. When I booted his computer yesterday, I saw a opening animation from some photo gallery organization program I'd never heard of, which had been installed in March. I promptly deleted it, but it got me thinking.
e. The main reason he had called me turned out to be that the computer was refusing to shut down - he was trying to restart to see if it helped. I couldn't pin down exactly what had stalled things, but Windows Live had had many registry keys open while the computer was attempting to restart.

The guilty party turned out to be this:
Windows Live Photo Gallery

This program has a feature called "auto-rotate"
http://blogs.msdn.com/b/pix/archive/2007/06/05/faq.aspx#q13

Quote:


Q: Why doesn't the Photo Gallery automatically rotate all of my photos?

Some photo applications will display photos as rotated (we refer to this features as 'soft' rotating) by reading metadata on the photo itself. Although the Photo Gallery rotates photos on import using this same metadata, many users have asked why it doesn't also rotate all un-rotated photos in their collection for them automatically, or at least display the photos as rotated like some other applications do?

The reason that the Photo Gallery rotates on import, but not after that (unless the user explicitly rotates a file), is because there are a number of applications that don't correctly update the photo metadata after rotating. This metadata is supposed to reflect the state of the photo, but if the photo is rotated without updating this metadata, another application using this metadata to determine whether or not to rotate it will incorrectly rotate the photo.

During import, the photos are coming directly from the camera, at which point the integrity of this metadata is not in question. So although it's 'safe' for the Photo Gallery to rely on this metadata to make an accurate rotate decision during import, as soon as the photo makes its way to the PC, any other application could interact with the photo, and potentially corrupt this metadata. Therefore, the Photo Gallery doesn't 'soft rotate' at this point.

We continue to hear feedback from users that this is a desired feature. Since most photo applications today handle this metadata correctly (most of the badly behaving applications have either been retired or updated over the years), we may revisit this decision in the future.




That was in 2007 - but later, their position changed:
http://windows.microsoft.com/en-US/windows-vista/Windows-Photo-Gallery-frequently-asked-questions

Quote:


If your camera can detect whether you take pictures vertically or horizontally (usually by using a sensor that can tell how the camera is oriented), your computer can automatically rotate JPEG pictures to the correct orientation when they are imported. If you use this option, you will not have to manually rotate pictures that appear sideways on your computer, and it does not affect the image quality of your pictures. Windows does this by default, but you can turn this feature off.
To turn off automatic picture rotation

  • Open Windows Photo Gallery by clicking the Start button Picture of the Start button, clicking All Programs, and then clicking Windows Photo Gallery.
  • Click the File menu, and then click Options.
  • Click the Import tab.
  • Clear the Rotate pictures on import check box, and then click OK.






Somewhere along the line of upgrading his PC, I installed the full Windows Live suite, figuring it would be useful for a home user like him. But... Windows Live Photo Gallery had chosen to become the default photo viewer, and... that auto-rotate feature was enabled by default.

It looks like who I can really blame is the photo-stitching program, because
A: the affected images were all TIFF files, and TIFF does not normally have EXIF tags that store orientation info. However, I could see that the file seemed to have EXIF information about the camera model, etc.
B. Windows Live Photo Gallery would have made the appropriate change if the orientation value had originally been set correctly. Apparently, it hadn't.

Solution:
Seeing as I knew of no program that could easily "undo" what Windows Live Photo Gallery did, I advised my dad to do the following:
a. Tell Photoshop to "View All" or some menu option I forget the name of - this enlarged the image canvas to be 32" x 32" due to the cropped portion of the image.
b. Rotate the image 90 degrees clockwise.
c. Crop the white portion of the image (now at the bottom of the screen) to resize the canvas back to 16" x 32".
d. Maintain a better backup of his photos
e. Uninstall Windows Live Photo Gallery, or barring that, disable the "auto-rotate" feature.

Fortunately only his images on drive C had been processed and his external drives had apparently not yet been touched, and he only currently has like 5 panoramas. While many other images had new-ish modification dates, they still opened correctly in Photoshop.

This took me about 90 minutes to figure out what had happened and how to correct. I feel like I deserve some sort of medal in troubleshooting.

- Stiletto



redk9258
Regular
Reged: 09/21/03
Posts: 3968
Loc: Troy, Illinois USA
Send PM


Re: Hit a weird software issue yesterday... new [Re: Stiletto]
#250965 - 04/06/11 03:28 AM


Good job troubleshooting! I hate software that messes with the original files while it is building an index or whatever. I had this happen to me several years ago when I installed Roxio Easy Media Creator. It changed the modified date stamp on hundreds of pictures because Roxio ran some indexing tool and added something to the files. I was able to disable that indexing "feature" but I feel they should have warned you on install or before it fucked with files. Luckily, I had a Ghost backup of all of the affected files. When you restore files using Ghost, the correct dates are restored too. I no longer use Roxio (or Nero as far as that goes) and I now set all of my media files to READ-ONLY unless I want to change them myself.



mogli
MAME Fan
Reged: 01/26/08
Posts: 1956
Send PM


Re: Hit a weird software issue yesterday... new [Re: Stiletto]
#251219 - 04/08/11 01:17 AM


I stay away from any networking sites/services.


PS: I paused to think on the wording of this, considering 'don't participate in', and realized that was not a comprehensive enough statement.



Consider it high comedy....sincere tragedy....whatever...don't take it personally.

The Culture



Pages: 1

MAMEWorld >> The Loony Bin
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  GatKong 
0 registered and 148 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1100