Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

We are using Adobe Photoshop on a Mac to output JPEG image files. These image files need to be rendered on an embedded output device that we have no control over. It seems that the files output by Photoshop use the Exif header format, whereas the embedded device only understands the JFIF header format.

According to Wikipedia:

Strictly speaking, the JFIF and Exif standards are incompatible because they each
specify that their marker segment (APP0 or APP1, respectively) appears first. In practice, most JPEG files contain a JFIF marker segment that precedes the Exif header. This allows older readers to correctly handle the older format JFIF segment, while newer readers also decode the following Exif segment, being less strict about
requiring it to appear first.

As an example, here is the Mac-rendered JPEG:

enter image description here

whereas the PC-rendered JPEG (which works on the embedded device) has:

enter image description here

You can also see the Exif header coming after the JFIF one in the PC image above.

Is there a setting in Photoshop that allows us to export JPEGs with the JFIF preamble in the header?


EDIT: After using JPEG Snoop, the header information it decoded is as below.

The PC-generated image has an APP0 (JFIF) header:

*** Marker: APP0 (xFFE0) ***    
OFFSET: 0x00000002
length     = 16
identifier = [JFIF]
version    = [1.1]
density    = 96 x 96 DPI (dots per inch)
thumbnail  = 0 x 0

The Mac-generated image has an APP1 (Exif) header:

*** Marker: APP1 (xFFE1) ***
OFFSET: 0x00000002
length          = 24
Identifier      = [Exif]
Identifier TIFF = 0x[49492A00 08000000]
Endian          = Intel (little)
TAG Mark x002A  = 0x002A
EXIF IFD0 @ Absolute 0x00000014
Dir Length = 0x0000
Offset to Next IFD = 0x00000000

Then, after running the suggested XnView, the Mac header looks like:

*** Marker: APP0 (xFFE0) ***
OFFSET: 0x00000002
length     = 16
identifier = [JFIF]
version    = [1.1]
density    = 72 x 72 DPI (dots per inch)
thumbnail  = 0 x 0

And the embedded device can now read this Mac-generated JPEG.

share|improve this question
    
It's the same version of Photoshop on both systems, and both systems use default settings for Photoshop? –  Daniel Beck Jan 24 '12 at 13:56
    
@Daniel: No, the PC JPG was just generated by taking a PNG from the MAC photoshop and saving out to JPG (by PaintShop Pro). PNG works fine on the embedded device, but we'd prefer JPG due to file sizes. –  Peter K. Jan 24 '12 at 14:07
    
Great question! The problem seems to be in Photoshop rather than in the underlying OS, so I'd vote for this to be migrated to its better (more proper) home. –  koiyu Jan 25 '12 at 17:19
1  
@koiyu Questions about software are allowed here –  Kyle Cronin Jan 25 '12 at 17:22
    
— Or wait. Maybe you were searching for OS X tools to make the conversion; I didn't remember XnView was cross-platform and those Notepad++ screenshots got me confused. Carry on. –  koiyu Jan 25 '12 at 17:22
show 1 more comment

1 Answer

up vote 3 down vote accepted

What version of Photoshop are you using? Apparently Adobe dropped support for exporting with JFIF at some point, and replaced it with EXIF.

You can try an app like XnView to strip out meta data:

http://newsgroup.xnview.com/viewtopic.php?f=60&t=24056

I just tried this with an EXIF jpeg on my computer, opened it in XnView, and then selected:

Tools > Export > [√] remove all metadata > Save…

The resulting file remained a jpeg, but had a JFIF header.

share|improve this answer
    
Very cool! XNView did the trick. Thank-you! Have a tick. :-) –  Peter K. Jan 24 '12 at 18:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.