An investigation into the JPEG format of EOS-1D images.
Since I originally wrote this article, I have learned quite a bit about JPEG files and the various flavors they come in. Digital camera makers tend to follow the Design rule for Camera Format system (DCF) specification.
Certain applications that I use in my workflow, namely iView Media Pro, have functions that rely on JPEG files that conform to the JFIF specification. Because of this, the images that my camera produces do not work properly out of the box with iView. I wrote JPEG-JFIF Repair to deal with this situation.
There is nothing wrong with the EOS-1D JPEG files. They are valid JPEG files.
I leave the rest of this page up for historical purposes.
Recently, I discovered an issue with the Canon EOS-1D firmware (1.01 to 1.3) regarding the way in which JPEG's are created. This issue creates significant workflow problems for existing photographers and agencies using the 1D.
Update: April 7, 2002
I released a utility, JPEG-JFIF Repair which fixes JPEG files with malformed JFIF headers. Download it today and start updating your JPEG files!
Copied below is original article that I wrote to Canon USA regarding the problem.
The Canon EOS-1D firmware creates non-standard JPEG/JFIF files.
Applications that depend on standard JPEG/JFIF files cannot perform certain operations on 1D images, such as embedding color profiles. This hampers the existing workflow processes of photographers depending on the EOS-1D for their work.
The 1D does not embed ICC Profiles in the images that it creates. As such, photographers have to manually assign color profiles to every image that is transferred from the camera. sRGB should be used for Color Matrices 1, 2, 3, and 5, and AdobeRGB (1998) should be used for Color Matrix 4.
Since I shoot exclusively in Color Matrix 4, I want an easy way to batch embed the AdobeRGB (1998) profile into my 1D images without altering the image. The "Convert to Profile" and "Assign Profile" commands in Photoshop are useless because they force me to resave the file. I don't want any further compression of my images, nor do I want to save the files as TIFF's.
A solution does exist for Macintosh users, and I suspect there are similar options for Windows users as well. ColorSync or an application such as iView MultiMedia Pro give the user the option to embed a color profile in an image without modifying the image data. Remember that color profiles are stored in the JPEG header, not in the JPEG data itself.
Unfortunately, this feature does not work with 1D images, no matter how many times you choose "Embed Color Profile" in iView MultiMedia Pro! This feature works fine with EOS-D30 images or with 1D images that have been modified and resaved using Photoshop.
I decided to take a closer look at the format of 1D JPEG files. I had the following documents at my disposal:
I discovered that 1D images do not conform to the defined standard for JPEG/JFIF files. For instance, 1D images taken with the main shutter release start with the following data stream (in hexadecimal format):
FF D8 FF E1 5C 11 45 78 69 66 ...
"FF E1" is defined as the APP1 Marker. Exif information such as the camera model, shutter speed, and aperture follow this marker.
The JPEG/JFIF specification states that the APP0 marker should immediately follow the SOI marker (FF D8) for a JPEG file:
FF D8 FF E0 00 10 4A 46 49 46 ...
where "4A 46 49 46" = "jfif"
After the APP0 marker, the APP1 marker and any other information can follow. D30 and images created in Photoshop all have the APP0 marker at their beginnings. When this marker is present, ColorSync or iView MultiMedia Pro can successfully embed an ICC Color Profile in the image (following the APP0 "FF E2" marker).
Note that iView is probably using the Macintosh's built-in ColorSync engine to embed ICC Color Profiles in files. If this is the case, then ColorSync is expecting JPEG images to conform to the JPEG/JFIF specification. Thus, because 1D images do not conform to this spec, color profiles cannot be embedded using existing software on the Macintosh.
Clearly, this is not good for people expecting to use the 1D in their existing workflow environments.
Update: April 6, 2002
I discovered that images shot using the portrait grip shutter release will create images with the proper JFIF APP0 marker. This is very interesting because if this happens 100% of the time, this "feature" might allow us to write a program to rotate images according to their orientation. Who needs the orientation sensor in the new Canon PowerShot cameras when you have malformed JFIF headers!
Fortunately, there are a couple of solutions to this problem:
Third-party solution to add the correct APP0 marker to existing 1D images. In this solution, an app has to be written to add the following information immediately after the SOI marker. For instance:
FF D8 FF E1 ...
is changed to:
FF D8 FF E0 00 10 4A 46 49 46 00 01 01 00 00 01 00 01 00 00 FF E1 ...
Here we added the APP0 marker in between the SOI and APP1 marker.
Adding this makes it possible for a ColorSync-capable application like iView to embed color profiles in 1D images. The problem with this solution is not all users will be able to create this program on their own nor will know that such an app exists for them to use.
Update: April 6, 2002
JPEG-JFIF Repair does just what Option 1 details.
Update the EOS-1D firmware so that new JPEG's are created with the proper JPEG/JFIF header. This solution requires no work on the user's part, save for installing the firmware.
Furthermore, because Canon has a distribution mechanism in place to alert 1D owners, updating the firmware will ensure that all 1D owners will get this update.
Option 1 is a current stopgap solution for current 1D owners. Option 2 in the long-run is the best solution for everyone.
I hope that this article makes clear the problem that photographers are currently experiencing with the EOS-1D's firmware. Photographers and agencies need to modify their existing workflow processes in order to incorporate the 1D. This shouldn't be the case, and fortunately a solution to the problem is outlined in this document. I trust that Canon will investigate this issue and quickly resolve it to everyone's satisfaction.
Thank you for your time and attention in this matter.
|
Adam, thanks for your research and well written article.
PS: Great Photos!
Best Regards,
Ray - a fellow iView user.
-- posted by Ray Miller @ Thursday, April 4 2002, 15:07 pm CST
Everyone:
In my continuing investigation, I''ve discovered that the 1D firmware sometimes includes the APP0 marker at the beginning of the JPEG file. I could not figure out, however, why it does it sometimes and doesn''t do it other times.
I found this out while testing an application that I wrote that verifies and updates any 1D JPEGs that do not have the proper header information.
I''ll try to post a beta of the software in the next day or two.
-adam
-- posted by Adam Tow @ Thursday, April 4 2002, 18:08 pm CST
This evening, I discovered that images shot using the portrait grip shutter release will create images with the proper JFIF APP0 marker. This is very interesting because if this happens 100% of the time, this "feature" might allow us to write a program to rotate images according to their orientation. Who needs the orientation sensor in the new Canon PowerShot cameras when you have malformed JFIF headers!
-- posted by Adam Tow @ Saturday, April 6 2002, 3:20 am CST
i'd like tp read a block of an image
-- posted by herve @ Thursday, May 30 2002, 12:30 pm CDT
Exif specification says that Exif marker is the first marker in the file, that's why it begins with FFE1. When Exif marker is present, standard JFIF marker (FFE0) is omitted. So the problem isn't in the camera, it's in the software that you use, because it can't handle such images.
Anyway it is a good article, it shows where is the problem and how to solve it.--posted by Vojtech @ Wednesday, February 12 2003, 3:45 am EST
Vojtech is right in that the first marker of an EXIF file should be FFE1. Furthermore, JFIF files can NOT comtain EXIF fields. EXIF fields start with APP1, whereas only APP0 is allowed in the JFIF standard.
"Fixing" the problem as suggested results in files that conform neither to the JFIF nor to the EXIF specifications.--posted by anonymous @ Saturday, December 17 2005, 1:15 am PST
Copyright © 1995-2008, tow.com. All Rights Reserved. Terms of Use
Tomorrow begins today.