Copy link to clipboard
Copied
I use an old program, created in December 2000, that displays images (as part of another process). Another user pointed out to me that when JPEG images are created by Photoshop CS6, the program can't display them (the message is 'Unknown image file format'). Images created by CS3 and CS4 are OK.
JPEG files created by Zoner Photo Studio have the same problem. However, MS Paint, Windows 10 Snipping Tool, Snagit, and XnView produce files that are OK.
I can work around the problem by converting the files in another program after editing them in Photoshop. But I wonder why the format produced by Photoshop has changed, and whether it can be configured to produce the old format.
According to this photoshop dropped one piece of data from the old JFIF standard to be compliant with the newer EXIF standard starting with photoshop cs5, so maybe that's the problem.
Copy link to clipboard
Copied
As an experiment try File>Save for Web>Jpeg and see if the older program reads those.
Likely photoshop is adding some metadata that the old program doesn't like.
Most like something that was added to the jpeg specifications, since jpegs from Zoner Photo Studio exhibit the same issue.
Copy link to clipboard
Copied
R_Kelly wrote:
As an experiment try File>Save for Web>Jpeg and see if the older program reads those.
Likely photoshop is adding some metadata that the old program doesn't like.
Most like something that was added to the jpeg specifications, since jpegs from Zoner Photo Studio exhibit the same issue.
Thanks for the suggestion. Unfortunately, it made no difference, even if I set 'metadata' to 'none'.
I think that metadata are unlikely to be the problem, because the files are OK when I add metadata (such as a description) in XnView.
Copy link to clipboard
Copied
Can you tell us what the name of the old program is?
Copy link to clipboard
Copied
R_Kelly wrote:
Can you tell us what the name of the old program is?
Intkey. It's available at http://delta-intkey.com/www/programs.htm. The CSIRO version is the one with the problem; the ALA port is OK (but requires Java).
Copy link to clipboard
Copied
According to this photoshop dropped one piece of data from the old JFIF standard to be compliant with the newer EXIF standard starting with photoshop cs5, so maybe that's the problem.
Copy link to clipboard
Copied
R_Kelly wrote:
According to this photoshop dropped one piece of data from the old JFIF standard to be compliant with the newer EXIF standard starting with photoshop cs5, so maybe that's the problem.
Thanks. It looks as though that's the problem.
However, the reasons given for not having an option to write the old format seem spurious. According to Chris Cox at the above page: "you cannot write a JFIF file that is EXIF compatible -- most EXIF compatible readers will choke on it (which is why we got so many complaints about Photoshop continuing to write JFIF)". I haven't found any modern apps that don't read both formats. No doubt there are some, but it would be up to users (the people creating the JPEG files) to decide which format was appropriate for their applications. In my case, the applications are Intkey and related programs, and Web browsers. The latter have no problems with the old format.
So, it seems I'll just have to use the workaround given in my original posting: use another program to do what Photoshop programmers consider impossible (or impractical). Fortunately, there are free programs around that do the job.
Incidentally, the reason I use Zoner is because of its good facilities for editing metadata, and for displaying selected metadata when viewing images ('slideshows'), though I still use Photoshop for editing the actual image content. In particular, I like to add descriptions (captions) and GPS data to my personal photos. As a result of investigating this problem, I stumbled across XnView, which is free, and has better facilities than the current Zoner for displaying captions in slideshows. If anyone is interested, there are some examples at http://www.dpreview.com/forums/thread/3478699#forum-post-51416126 - I suggest using the 'flat' view of the forum.
Thanks again for your help.
Copy link to clipboard
Copied
Mike can you please provide a link to a “good” file and a “bad” file via DropBox or similar file sharing sites, FTP etc?
If this is just metadata related, ExifTool should be able to come to the rescue, perhaps something like this to test if this creates a readable file or not:
exiftool -JFIF:XResolution='222' -JFIF:YResolution='222' -JFIF:ResolutionUnit='inches' 'Mac OS Path/to/MY BAD FILE.jpg'
Then if it does work, it would be “easy enough” to copy the values from the existing XMP tags into the JFIF tags.
Another approach worth trying is to get ExifTool to fully rebuild the entire metadata/file copying over the binary image data as required:
exiftool -all= -tagsfromfile @ -all:all -unsafe -icc_profile 'Mac OS Path/to/MY BAD FILE.jpg'
NOTE: The previous command line codes are from the Mac, on Windows simply change the single straight quote/foot mark ‘ to straight double quote/inch marks “ with the correct platform specific path to the file or top level folder.
Copy link to clipboard
Copied
Stephen_A_Marsh wrote:
Mike can you please provide a link to a “good” file and a “bad” file via DropBox or similar file sharing sites, FTP etc?
The following files are in http://delta-intkey.com/test\jpeg01.zip.
JPEG files tested in CSIRO Intkey
CS6.jpg - created in Photoshop CS6. Can't be read by Intkey.
The following files were converted from CS6.jpg by various programs. All can be read by Intkey.
CS6-CS4.jpg - Photoshop CS4
CS6-NConvert.jpg - NConvert (command-line image converter, http://www.xnview.com/en/nconvert/)
CS6-Paint.jpg - Paint (image editor included in Windows 10)
CS6-XnView.jpg - XnView (multimedia viewer, organizer and converter, http://www.xnview.com/en/)
Copy link to clipboard
Copied
Please let me know how these two test files go:
CS6_JFIF_Added.jpg = JFIF metadata added to file with the following ExifTool command (Mac OS formatted):
exiftool '-IFD0:XResolution>JFIF:XResolution' '-IFD0:YResolution>JFIF:YResolution' '-IFD0:ResolutionUnit>JFIF:ResolutionUnit' 'MAC OS/PATH/TO/CS6_JFIF_Added.jpg'
CS6_Rebuild.jpg = Metadata rebuilt using the following ExifTool command (Mac OS formatted):
exiftool -all= -tagsfromfile @ -all:all -unsafe -icc_profile 'MAC OS/PATH/TO/CS6_Rebuild.jpg'
Copy link to clipboard
Copied
CS6_JFIF_Added.jpg worked. CS6_Rebuild.jpg didn't.
Copy link to clipboard
Copied
OK, so it is definitely the missing JFIF tags then.
Opening/resaving a JPEG is not best practice, due to the lossy compression.
ExifTool does not touch the binary image data when it alters the metadata and re-writes the file and it would be faster too.
You can easily swap out the path to the file with a path to a top level folder and add in the -r argument/command to recursively process multiple files in sub-folders under the top level folder. You can also restrict processing to only JPEG files too, if the top/sub folders contain other formats. Finally, it is also possible to exclude specific folders from be processed and to overwrite the originals rather than creating a duplicate file _original for safety.
Let me know if you wish to explore these options.