Skip to main content
Adobe Photoshop Family

9 Messages

 • 

260 Points

Wed, Jun 22, 2011 10:52 PM

Photoshop: jpg exposes bugs in QImage and ZoomBrowser

Since a recent upgrade to CS5 (I guess 12.0.4 and certainly the current version) JPG files I've saved take about 1000x times longer to open in Canon ZoomBrowser 6.7.2.33 (the latest version). When I say 1000x I mean 1000x. Recent jpg are taking over 30s to open a single image! I raised this with Canon sending then old and new jpg (created using an older version of CS5 and the latest) from the same CR2 file. They said:

Extracting the EXIF data from both the good and bad images we found that the JPEGInterchangeFormatLength (JpegIFByteCount) value is bigger in the bad files.
JPEGInterchangeFormatLength shows the number of bytes of JPEG compressed thumbnail data.

We believe that this higher number is causing the problem as the ZoomBrowser EX application is trying to use the EXIF data to generate the thumbnail images, and to display the files. We were able to reproduce the issue in our test environment.

We would recommend you to contact the Adobe support in order to find out if there were any related updates released in the last few weeks that possibly was installed on your computer manually or automatically.

Please can you investigate what changed recently in CS5. And how I rescue my recent jpg images that I've needed to create for my clients. If you need the images that I sent Canon for your investigation then please let me know.

Responses

Adobe Administrator

 • 

15.4K Messages

 • 

291.4K Points

9 years ago

What OS are you on?

Sr. Product Manager, Adobe Digital Imaging

2.1K Messages

 • 

32.2K Points

9 years ago

Providing the same files would be an enormous help!

15.1K Messages

 • 

195.8K Points

FYI - we got sample files, there was nothing wrong with them. This appears to be a bug in Canon's ZoomBrowser code, but we haven't been able to talk to Canon's developers to narrow it down.

15.1K Messages

 • 

195.8K Points

9 years ago

No changes, the JPEG and thumbnail code hasn't changed in the dot releases.

If Canon has specific issues, they need to contact us directly with details.

26 Messages

 • 

280 Points

9 years ago

There are definitely issues with file saving in 12.0.4. If you use the image processor to process raw photos into JPEG's, many times the saved JPEG's contain three embedded ICC profiles: sRGB is embedded twice and Adobe RGB is embedded once. Definitely needs to be fixed.

15.1K Messages

 • 

195.8K Points

Why do you believe that there are 3 ICC profiles in the JPEG file?

26 Messages

 • 

280 Points

Because I can open the file in a hex editor and see all three. Three ICC_PROFILE tags and three different locations in the same file. Problem did not occur in 12.0 x64. Only 12.0.4 x64. It doesn't seem to be consistent either. Some files have the problem and some don't. It's almost like some variable/block isn't getting reset and it's retaining tags from previous files it may have processed. But that's just a guess. NEF's I was trying were from a Nikon D700 and there were a couple "stray" non-raw (jpg) images in the same folder when I turned image processor loose on the folder.

15.1K Messages

 • 

195.8K Points

Unless you have a bad disk or a problem with the OS - that's pretty much impossible. And, again, the JPEG code didn't change in the dot releases. If you can send me some files (ccox at adobe dot com), I'll take a look and see if there's any pattern.

15.1K Messages

 • 

195.8K Points

Follow up - Mike's guess was wrong. The JPEG file is just fine, but QImage's parsing code is broken and it picked up the wrong profile.

26 Messages

 • 

280 Points

Follow up - the JPEG file is not "just fine". Sometimes CS5 produces JPEG's with the correct header and sometimes it produces a header that has inapplicable profiles attached to multiple thumbnails in the header. While the aberrant files *will* parse, embedded profiles are not applicable to thumbnails and the inconsistent saving behavior needs to be fixed so that the same file converted with exactly the same settings will produce the same output: not different output depending on a "leftover" state based on what was converted previously. The Qimage bug, which only surfaced due to the Adobe bug, has already been fixed. Please focus on consistent file saving with the next CS5 release.

15.1K Messages

 • 

195.8K Points

You're contradicting yourself. The JPEG images parse correctly, and doesn't affect applications that read JPEG correctly. Only QImage has problems because it failed to parse JPEG images correctly.

Yes, we will work on the very minor Photoshop issue.
But the problem discussed here is a more major QImage issue of failing to read JPEG images correctly.

26 Messages

 • 

280 Points

I don't want to belabor this and I promise this will be my last post, but you really do need to get more familiar with the JPEG spec because the Qimage parsing issue is ancillary to the header corruption caused by the intermittent CS5 bug. The Qimage bug will never surface unless the file header is corrupted and this CS5 bug results in undeniable corruption of the header. A file corruption bug is worse than an "error handling" bug in my opinion.

And yes, those files *are* corrupted. You have a thumbnail embedded in the JPEG stream itself and as such, the spec calls for that embedded thumbnail to be free of JFIF segments. Simply put, embedding a profile in a thumbnail image IS NOT ALLOWED by the spec yet the CS5 bug is causing the APP2 JFIF segment to appear there: where it shouldn't. I suspect that might be why BreezeBrowser and other software are having issues with the files. Yes, with the right error handling, they can work around it, and maybe it can even be argued that they SHOULD work around it because embedded profiles in thumbnail images are not allowed. But they really shouldn't be there in the first place so I suspect it is possible that other software engineers have not accounted for that non-spec condition either.

15.1K Messages

 • 

195.8K Points

You are belaboring it, and continuing your attempt to shift blame onto Photoshop for the bugs in your software (or just your misunderstanding of file format standards and how to parse file formats correctly).

26 Messages

 • 

280 Points

9 years ago

Impossible, yet there it is. On multiple installations, different machines. This is actually one of my customers/users. I wasn't able to replicate her problem at first but I discovered it was because I was running an old 12.0 x64 CS5. As soon as I upgraded to 12.0.4 x64, the problem appeared exactly as she was getting it. She says she's contacted you (before I did here) and she's also sent you an XVI32 dump that proves the problem, so since the images are not mine, I'd prefer that she send them to you. I'll let her know and will ask her to contact you. I was able to replicate the problem easily once she sent me a couple NEF's and gave me her settings in image processor. Thanks for the help.

26 Messages

 • 

280 Points

9 years ago

I'm going to prepare a ZIP for you and send it to you. I'm waiting for permission to send you the photos since they are not mine. Here's what I found. If I put two NEF's in a folder and use image processor, it works fine. If there is an sRGB JPEG in between such that image processor processes one NEF, then the sRGB JPEG, then the next NEF, the last NEF is corrupted with the three embedded profiles. That's why I say I believe it's a variable initialization issue since it looks like the sRGB is being carried over from the JPEG being processed between the two NEF's. If you image process 1775.NEF, 1960.NEF, and then 1999.JPG (the sRGB JPEG), all is fine because the sRGB JPEG is last. As soon as you rename the JPEG to 1780.JPG so that the image processor processes the JPEG as the second image in the batch, the last NEF (1960) gets corrupted. Anyway, I'll send you the ZIP tomorrow. That should be all you need to replicate the problem because it happens every time.

15.1K Messages

 • 

195.8K Points

9 years ago

The person with the XVI32 dump just showed different images with different profiles - almost certainly user error.

If one file has multiple profiles in it, then I need to get the files to examine.

You're making a lot of bad assumptions about what is going on (and what's even possible to occur).

26 Messages

 • 

280 Points

9 years ago

There aren't any assumptions being made. Only observations. When I send you the three files, you'll be able to reproduce the problem. Put the two NEF's in a folder and run the image processor to convert to quality 12 JPEG's and the two converted JPEG's are fine. Put one sRGB JPEG into the folder with the two NEF's and now the NEF that is converted after the JPEG goes sour: two sRGB profiles embedded plus one Adobe RGB. That's the same NEF having a completely different result from the image processor: correctly when the JPEG isn't present in the same folder and incorrectly when the JPEG is present. Only way I can fathom that happening is a bug in CS5. Don't see how user error could cause the same NEF to convert two different ways with the exact same conversion setting, only depending on whether or not there is a JPEG converted before it or not.

26 Messages

 • 

280 Points

9 years ago

OK. No response from my customer yet on getting permission for her photos (too late I guess) so I tried two of my own photos. They had the same problem: untouched raws from a Canon 5D. Doesn't look like it depends on the camera model so I just sent a ZIP file to you via yousendit. It contains all you should need (files and instructions) to recreate the problem where CS5 creates JPEG files with three embedded profiles on the conversion. Please let me know if I can be of further assistance.

9 Messages

 • 

260 Points

9 years ago

Mike,
I agree it is very variable - some pictures are fine and some are not and I cannot see a pattern. But it does occur on my 7D and G11

If you have a "bad image" and are able to look at the hex you might want to try this:

open the file and then invert the image twice, I just use Ctrl I, so you get what looks like the same image back, then save it.

You will now find this is a "good image", this is what I've been using as a workaround. But if you can look at the hex you may be able to see what got fixed in the image.

26 Messages

 • 

280 Points

9 years ago

Andrew, I think by doing that invert-invert, you are just forcing it to re-form the file header, overwriting the corrupted one. I think Chris will be able to reproduce/fix it now. Still looks to me like something getting cross-linked during the conversion: some "stale" piece of the header from a previously converted JPEG gets left over in the raw photo when that gets converted afterward.

14 Messages

 • 

202 Points

9 years ago

I would LOVE to send you files to look at. If you like, I can shoot some that never even go through my photoshop and let you convert them yourself. I can send you converted files, I can send you files that are right and files that are wrong. Just tell how many you want and where and how to send them.
I would also like to know if there is a way to check a log noting when the newest update occured, because I know the exact date the problem came into being in my workflow. I am not blindly pointing fingers or assuming any thing, just trying to get down to the problem, that obviously I am not the only one having.

15.1K Messages

 • 

195.8K Points

ccox at adobe dot com

14 Messages

 • 

202 Points

I tried to email the raw/nef files but they would not send because of their size. I did send you some jpgs to look at and put the others in my box.net account and sent you an invite.
Also sending with yousendit, so you might have to look in junkmail for it.

15.1K Messages

 • 

195.8K Points

Looks like you were talking about the QImage bug. Check with Mike to see when he'll have a version out that correctly parses JPEG files with color profiles.

26 Messages

 • 

280 Points

Already fixed and released. How are you doing on the CS5 bug?

1 Message

 • 

60 Points

9 years ago

I'm going to chime in with something I ran into with with 12.0.4 x64 yesterday.

I finished working on a re-sized JPEG saved in 'Adobe 1998' to send via my Excite.com account through AT&T/Yahoo! DSL and the server sent back an error message: "File is corrupt, or larger than 25MB limit. Try again?" That was new. I tried over and over and got the same message in about 10 seconds from their server. I've never seen a "Corrupt file" message from a server on a JPG before.

I redid the same JPG file and saved it with Paint Shop Pro X3 (same 'Adobe 1998' colorspace) and it went through without a glitch. File size report by Windows Explorer was 328 KB in CS5 and 325 KB in PSP X3.

From CS5 12.0.4 x64:
Format : JPEG
File size : 329 KiB
Image Format : JPEG
Width : 656 pixels
Height : 900 pixels
Chroma subsampling : 4:4:4
Bit depth : 8 bits
Compression mode : Lossy

From PSP X3:
Format : JPEG
File size : 324 KiB
Image Format : JPEG
Width : 656 pixels
Height : 900 pixels
Chroma subsampling : 4:4:4
Bit depth : 8 bits
Compression mode : Lossy

14 Messages

 • 

202 Points

9 years ago

I was wondering if anyone at Adobe Family has opened any of the files I sent? If not, please get with me so I can send you files and you can help determine the problem and solution.
Also, still wondering if there is a way to revert back to an update before 12.0.4 or to see when that update actually took affect?

26 Messages

 • 

280 Points

9 years ago

Based on a search, looks like 12.0.4 was released May 3, 2011. When you actually got it on your particular computer... that could be a different story.