Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: About Preview and rotated/mirrored images Apps
Tiger only hintSo I have this nice new background image. As you can see, it would look kind of crowded with my desktop icons stacked up on top of the island on the right. Simple enough, I decide to mirror the image.

My first shot was to import the picture into iPhoto and try to mirror it there. No luck. I don't know if I'm being blind, or if there's simply no mirroring function in iPhoto. I searched high and low, but all I could find was a reference to a "mirrored mosaic" slide show thing.

Okay, so now I try opening the photo in plain old Preview.app. Eureka! It mirrors my picture perfectly. But when I save the result as a new picture and open it in any other app, it looks just like the old one. Weird. Opening the new file in Preview.app again shows the picture mirrored, just like I wanted it. After even more research, I realize this is a known bug in Preview.app (See this entry at drunkenblog.com, scroll down to the "Oh, Preview.app" section).

Well, here's the tip I wanted to share with you. I wound up showing my new mirrored picture fullscreen in Preview.app and grabbing it using Screen Capture. Now I finally have a mirrored version of the original image. It does have some minor quality flaws, but I can live with that for now.

Apparently this is the only way to properly export an altered image from Preview.app.

[robg adds: This isn't a bug, it's a feature. Apple recently added a new Knowledge Base document on this very subject, Rotated images do not appear rotated in some applications. The explanation is, basically, that 10.4 supports EXIF-standard rotation, while previous versions of OS X did not. So EXIF-aware applications will show the rotated image, while others will not. Why is this a good thing? They explain:
This means that, in earlier versions, saving an image after rotating changed the actual pixels of the image file. However, this was often not desireable because rewriting the image file itself in the new orientation could degrade image quality (especially with lossy graphic formats such as JPEG). With EXIF-compatible applications, if you rotate an image, the file doesn't need to be rewritten.
If you need the image rotated permanently in all applications, you'll need to run it through an image manipulation program that can rotate the actual pixels, such as Photoshop Elements, Photoshop, Graphic Converter, etc. You will then, of course, suffer possible image degradation...]
    •    
  • Currently 3.80 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[30,480 views]  

10.4: About Preview and rotated/mirrored images | 30 comments | Create New Account
Click here to return to the '10.4: About Preview and rotated/mirrored images' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: About Preview and rotated/mirrored images
Authored by: rhowell on Dec 07, '05 07:39:06AM

In Preview, save the rotated JPEG file in a nondestructive format, like PNG. The pixels will be rotated, and there will be no loss of quality. Then save the PNG file as JPEG if you need higher (lossy) compression.

PNG is nondestructive, right? Please correct me if I'm wrong.

Apple should have ALL of its apps be EXIF-aware.



[ Reply to This | # ]
10.4: TIFF is nondestructive
Authored by: mclbruce on Dec 07, '05 08:49:14AM

TIFF is a safer choice than PNG. PNG does use lossy compression.



[ Reply to This | # ]
10.4: TIFF is nondestructive
Authored by: jctull on Dec 07, '05 09:00:23AM
According to this link, png is lossless.

[ Reply to This | # ]
10.4: TIFF is nondestructive
Authored by: fredshome on Dec 07, '05 09:02:33AM

Actually it doesn't. PNG *always* uses lossless compression and has a much simpler specification than TIFF since it can't be used as a container for all kinds of weird things (although current Tiff libs got better at handling weird file nowadays). So PNG is usually a much better choice especially when portability is a factor.

The caveat is that some apps apparently still can't read PNGs (in Windows it seems, don't know about the Mac since I don't typically manipulate images on either of those systems). But then lots of apps can't read Tiff either... Of course that's probably not a factor in the current case :)



---
Fred in Paris.



[ Reply to This | # ]
10.4: About Preview and rotated/mirrored images
Authored by: jacobolus on Dec 08, '05 06:55:29AM

Unfortunately PNG and TIFF are much larger file formats than jpg, which is compressed. To get back to jpg after going through one of these formats would require losing data through re-compression.



[ Reply to This | # ]
10.4: About Preview and rotated/mirrored images
Authored by: rhowell on Dec 07, '05 07:57:00AM

The Knowledge Base article states:

"Mac OS X 10.4 Tiger supports image rotation according to EXIF standards. Earlier Mac OS versions did not support the EXIF standard."

It should instead state:

"Preview in Mac OS X 10.4 Tiger supports image rotation according to EXIF standards. Earlier Mac OS versions did not support the EXIF standard, nor do other applications in Mac OS X 10.4 Tiger, including Safari, Mail, iChat, and Quicktime Player."



[ Reply to This | # ]
10.4: About Preview and rotated/mirrored images
Authored by: dlong on Dec 07, '05 09:01:55AM
Well it's not a fix for Preview, but luckily there is another free way to flip backgrounds.

Install the netpbm utilities to get some really neat, powerful graphics filtering. They can be installed from http://netpbm.darwinports.com/ if you have darwin ports, or http://pdb.finkproject.org/pdb/package.php/netpbm10 if you have fink. I think I just downloaded the source - it compiled and installed cleanly from http://netpbm.sourceforge.net/

Once you have the netpbm utilities, you can do all sorts of things. To flip your background image, open a Terminal and issue a command like djpeg background.jpg | pnmflip -lr | cjpeg > flippedbackground.jpg. More on the syntax for pnmflip, which actually does the flipping, is available at http://linux.about.com/library/cmd/blcmdl1_pnmflip.htm

[ Reply to This | # ]

10.4: About Preview and rotated/mirrored images
Authored by: adrianm on Dec 07, '05 09:40:49AM
Not near a Mac*, but if you're at the command line, try:

sips --flipHorizontal filename
No need to install anything else.

Applscript has access to image manipulations too.

* so this might not actually do anything with the pixels

[ Reply to This | # ]

PhotoTool CM
Authored by: frank nospam on Dec 07, '05 01:11:53PM
Try this freeware contextual menu extension that looks like it implements the sips ImageEvents in friendly GUI form.

It's positively shameful that jpeg editor apps still use lossy rotates in this day and age.



[ Reply to This | # ]
PhotoTool CM
Authored by: RobertBen on Dec 09, '05 07:47:09AM

But PhotoTool CM doesn't support Tiger :-(



[ Reply to This | # ]
10.4: About Preview and rotated/mirrored images
Authored by: derrickbass on Dec 07, '05 04:28:49PM
This will result in some quality loss due to recompression. It turns out that JPEG, even though it is a lossy format, can be rotated and flipped losslessly. I don't know whether sips uses the lossless algorithm, but if not, the jpegtran program can do it. If you have fink, do
fink install libjpeg and then man jpegtran

[ Reply to This | # ]
10.4: About Preview and rotated/mirrored images
Authored by: Rogue.Monk on Dec 07, '05 09:42:56AM

What about SIPS? The command-line tool that comes with OS X?

This works for me.

sips --flip horizontal DSC_5463.JPG --out newImage.jpg

SIPS is actually pretty cool for basic stuff like this. Check the man page and this site (or others) for more info.



[ Reply to This | # ]
10.4: About Preview and rotated/mirrored images
Authored by: SonicDeathMonkey on Dec 07, '05 10:25:15AM

I ran into this bug/feature last week when an account manager was trying to manipulate a few jpegs with preview and then paste them into MS Word. The images open correctly in preview but when copied they still paste into Word with the original orientation and the rotate options within Word are grayed out. When opening the files in Photoshop they showed up correctly, but as a changed file, so the dot showed up in the close button. A simple open, save, close was all it took to get the files to paste correctly into Word, but the image was re-compressed.



[ Reply to This | # ]
10.4: About Preview and rotated/mirrored images
Authored by: caesurae on Dec 07, '05 11:44:24AM
I haven't upgraded to Tiger yet, but I'm all too familiar with the Preview bug. Although...the same thing happens to me when using the Crop function. Many apps will display the "cropped" version in it's original, unedited state.

For a gui alternative to the command-line solutions mentioned above, try Goldberg X 2.5 [home page - more info], a free image viewer/editor with support for QuickTime's many built in functions/filter effects.

[ Reply to This | # ]

Mirroring an image using PhotoShop CS2
Authored by: rotaiv on Dec 07, '05 12:52:00PM

To mirror an image using Photoshop CS2, perform the following:

Press CMD+T or select "Edit -> Free Transform"

Change the for "W:" (Width) to -100% to flip vertically or change "H:" (Height) to -100% to flip horizontally.

You can also use the image "handles" to click and drag from right to left (or vice versa) until the "W:" is -100%.



[ Reply to This | # ]
Mirroring an image using PhotoShop CS2
Authored by: qwerty denzel on Dec 07, '05 05:56:02PM
Why not use Edit > Transform > Flip Horizontal or Image > Rotate Canvas > Flip Canvas Horizontal?

[ Reply to This | # ]
Rotate or flip JPGs lossless for free
Authored by: tice on Dec 07, '05 01:04:37PM
I had the same problem with rotating and found one of Pixture Studios
free contextual menu item called PhotoTool. PhotoToolCM!!!
Enjoy! : )

[ Reply to This | # ]
PhotoTool
Authored by: jiclark on Dec 07, '05 01:35:22PM

Yep, same CM that Frank links to above. He just didn't name it in his postů



[ Reply to This | # ]
Doesn't work in Tiger
Authored by: RobertBen on Dec 09, '05 07:50:17AM

It's a pity, but Phototook doesn't work in Tiger :-(



[ Reply to This | # ]
10.4: About Preview and rotated/mirrored images
Authored by: jacobolus on Dec 07, '05 05:30:13PM

GraphicConverter does lossless rotation/mirroring/cropping of jpegs (well, for cropping you need to make sure you stick to cropping to the 8x8 blocks used by the original JPEG). So you can rotate the image quickly, losslessly, in such a way that all image viewers will see the difference.



[ Reply to This | # ]
10.4: About Preview and rotated/mirrored images
Authored by: Tom Robinson on Dec 07, '05 08:39:51PM

Yes, I use GraphicConverter to do lossless rotations on all the rotated JPEGs imported from my digital camera. I figure it's better to rotate a picture once when I transfer it to computer, rather than having a program do it everytime I view the picture (plus, as noted above, the results are much more consistent).



[ Reply to This | # ]
10.4: About Preview and rotated/mirrored images
Authored by: legacyb4 on Dec 08, '05 06:40:47AM

Why not view it full screen and take a screen shot when it's mirrored?

---
lumine.net



[ Reply to This | # ]
10.4: About Preview and rotated/mirrored images
Authored by: jacobolus on Dec 08, '05 06:51:46AM

Because this requires either A) storing a bigger file (jpeg is compressed), or B) losing image quality be re-compressing



[ Reply to This | # ]
10.4: About Preview and rotated/mirrored images
Authored by: sdball on Dec 08, '05 06:45:56PM

Wow. I can't believe how many people have commented without mentioning automator. And in a 10.4 hint too! For shame!

Follow these steps for a onetime rotate:

Right click image
Automator
Create Workflow
Type "rotate" into the automator action search
Drag "Rotate Images" below the "Get Specified Finder Items" action on the right
(Add a copy image if you want, don't add if you don't want)
Pick a rotation
Click "Run"

To make this really easy (if you want to do it more than once)
Start with a completely blank automator script (no action boxes on the right)
Add "Get Selected Finder Items"
Add "Rotate Images"
File->Save As Plug-in
Name the plug-in appropriately (rotate, mirror, twist, whatever)

Now in the finder right click any image and choose your rotate plug-in from the automator menu. Easy as dragging the mouse!



[ Reply to This | # ]
hello Preview bug above shows up in this
Authored by: qoo77 on Jul 02, '06 04:19:09AM

i wonder if u ever read the above



[ Reply to This | # ]
update
Authored by: Moofisto on Oct 14, '06 04:31:02AM

Heh, probably not.

Anyway, even though PhotoToolCM (currently at 2.0) hasn't been updated for Tiger yet, I just losslessly flipped a JPEG file with 2.0 just fine while using OS X 10.4.8.

As mentioned above, GraphicConverter is a trustworthy tool for JPEG transformations like this.

[ Reply to This | # ]

10.4: About Preview and rotated/mirrored images
Authored by: Skinny MC on Dec 13, '07 11:02:24PM

I think this is a great solution. The file size does change a bit but it's an easy fast way to rotate the file. Files wouldn't stay rotated when I saved in Preview but using the automator script the rotation stuck.



[ Reply to This | # ]
Import to iPhoto
Authored by: ebeans on Jun 28, '07 12:18:30AM

Alas... two years since the original posting, this annoying issue persists. It affects the wallpaper panel in System Preferences too.

I guess the quickest way (for me at least) to rotate multiple images is to drag them to iPhoto. Rotate them there, then drag them back into the folder, and delete the images in iPhoto.



[ Reply to This | # ]
PhotoToolCM doesn't work in 10.4.10
Authored by: ebeans on Jun 28, '07 12:21:54AM

Well, it doesn't work for me. :-(



[ Reply to This | # ]
10.4: About Preview and rotated/mirrored images
Authored by: Marba on Nov 29, '07 08:07:38PM

Is this a bug? Any solutions?

My Finder displays a JPEG icon that do not match the actual picture's orientation. In the "Get Info", the tiny icon (found at the top left corner defaults to the standard JPEG icon) but the Preview also do not match the actual picture's orientation.

It seems all these three are different images and could possibly be independent rather than synonymous, bearing the same orientation. I would presume that all should conform to EXIF where available, otherwise take its cue from OS X file systems.

Can anyone recommends any freeware to resolve these? Or are there any shareware, commercial tools to resolve it?

I had reported this as a bug to Apple and was told that Leopard corrects this problem. But I have not upgraded yet. (I am using a dual 1.42GHz G4 with OS X Tiger).

Marba Chan
marbachan@gmail.com



[ Reply to This | # ]