Mysterious Forces in OSX appear to change file types (but can’t really)

Note to my kind readers (January, 2017):
The mysterious forces described below no longer seem to work. I have experimented with this in recent months, and have had no luck in repairing JPEGs using this technique. But read on anyway! It will still work with older Mac operating systems…

I attended the monthly meeting of the local Macintosh Users Group last night (I am the Treasurer of the group), and listened as a bright young man names Justin Sharp told the audience how to fix things before taking a Mac in for service. It was pretty good stuff.

At one point he was talking about file types, and he mentioned that the Macintosh Operating System will convert photos from one format to another just by changing the suffix of the file.

I was skeptical of this, as I have had to solve problems caused by this same technique for customers and students, and I just couldn’t believe it was true.

His comment was that if you change the .png suffix of a PNG file to .jpg, and click on the “Use .jpg” alert that follows, the file will actually be converted to a JPEG. It seemed preposterous to me. So when I got home I tested it, and in fact it does not work.

This is the kind of alert you get when you change the suffix of a file from .png to ,jpg. If you check the “Use .jpg” button, it will dutifully change the suffix for you, rendering the file inoperable.

After you change the suffix to .jpg, then attempt to open the file in Adobe Photoshop, you’ll get this error message.

But, I tried a few other variations on this theme, and I discovered that some combinations of photo file types do work this way, just by changing the suffix. I searched the Interwebs and looked high and low for documentation to explain this, and I can’t find any. I did find a blog where Automator is discussed in detail, and it turns out that Automator can convert some files from one type to another without the support of any application. This must be an OS-level tool that Automator calls, and it will convert file types quickly and easily.

So, let’s assume that the OS calls the AppleEvent (called an OSAX) for a file conversion from PNG to TIFF, executes it on a file, and makes it into a TIFF file. Or, you could do the opposite. I tested this, and it works. It may also be that PNG files and TIFF files have so much in common that all it takes is to change the file suffix to make Photoshop think it’s opening the opposite, and it just works. A happy conicidence?

I tried interlaced PNG files and non-interlaced PNG files. Both work. I tried saving a TIFF file, and changing the suffix to .png. It works.

But, when I tried to change JPEG to TIFF or JPEG to PNG, it will not work.

Here’s a chart of my findings:

This can be summarized as follows: PNG and TIFF can be converted back and forth by changing the suffix of the file. Nothing else works.

And, it is an interesting phenomenon that I am chalking-up to Mysterious Forces at work.

This will not work on Windows.

About Brian Lawler

Brian Lawler is an Emeritus Professor of Graphic Communication at California Polytechnic State University, San Luis Obispo and was a Guest Professor at Hochschule München from September, 2021 to September, 2022. He writes about graphic arts processes and technologies for various industry publications, and on his blog, The Blognosticator.
This entry was posted in Photography, Software. Bookmark the permalink.

2 Responses to Mysterious Forces in OSX appear to change file types (but can’t really)

  1. Nick Beadman says:

    Tried this just now on both 10.6.8 and 10.7.4 and confirmed that nothing is changing other than the filename.

    Preview and Photoshop might open the documents OK but no bytes on disk are changed. If they were that would be a very scary thing. You need to be careful about where you are creating those files and what type and creators you are leaving assigned.

    When changing from .tif to .png or vice versa you can use the More Info tab of the Inspector in preview to see that the file is being recognized as what it was originally.

  2. Brian Lawler says:

    Thanks, Nick!

    I have always been suspicious of changing a file’s suffix, as it doesn’t change the file, it just changes the name.

    One could really cause a wreck when changing a file name, and not remembering what it was when it was born.

    Brian

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.