I'm sorry, Dave. I cannot show you these images.
December 4, 2012 12:45 PM   Subscribe

Is there some sort of free-as-in-beer program to tell you what if anything is wrong with an image?

I'm part of this project at work where we're scanning and uploading images to put online through some proprietary software. The project has been basically stalled for months because IE 8 and IE 9 are very confused about what to do with the images (IE 8 still has enough of the market share that we can't ignore it). The images are all jpegs of various shapes and sizes, typically 72 dpi and several thousand pixels along the longest dimension.

Firefox and Chrome both always show all the images fine, but sometimes IE 8 won't show an image that IE 9 will, or IE 9 won't show an image that IE 8 will, and sometimes an image that works in IE 8 on one machine won't work in IE 8 on another, and when IE fails to show the image there's a wide range of ways it might fail. Sometimes it pulls up an empty window where the image should be, sometimes it's an outline of the image with a red X (even though the image is definitely there and other programs can show it), and sometimes the image might flash onscreen and then disappear.

I've been talking for months with someone at the company that makes the software which is supposed to be handling these images, and while the company has been patient and persistent in trying to figure out the cause, they also haven't yet figured it out, so the project has been stalled all this time. Management wants this to move ahead. I want this to move ahead (God, do I ever want this to move ahead).

Today it occurred to me I could load the images on a flash drive and see if they all load directly in IE, which could at least eliminate the possibility that it's a problem with the images themselves. I didn't expect it to be a problem with the images themselves, because--again--Firefox and Chrome handle them just fine.

Many of the images wouldn't load from the flash drive in IE 8, though they were all there, and the OS could read the filesize and pixel dimensions. Many of these exact same images gave different behavior in the exact same browser on the exact same machine when we loaded them directly from the URL.

Some of these images showed different behavior on two different but supposedly completely identical machines, both running the exact same version of IE 8 (down to the last x in 8.x.xxxx.xxxx).

Is there some free (or affordable) program which at least can help us analyze these images and find out what, if any, irregularities there are about them? I'm way out of my depth here, but even something like "this file has a header reporting it to be a jpeg-whatever-x when it's a jpeg-whatever-y"--something that can maybe put us on track towards getting this resolved?
posted by anonymous to Technology (10 answers total) 2 users marked this as a favorite
Have you considered just converting them all to the same format instead of displaying them as is?
posted by empath at 12:58 PM on December 4, 2012 [1 favorite]

Were they by any chance in CMYK color format? Try opening them in Photoshop, converting to RGB, and saving.

A Google of why won't ie8 display jpg gave some promising info along these lines. one, two.

If that is the problem, there seems to be a way to batch convert them using ImageMagick.
posted by amtho at 12:59 PM on December 4, 2012

IrfanView has some advanced image information, as well as some batch conversion tools that may help you.
posted by deezil at 1:32 PM on December 4, 2012

From the OP:
Someone asked if the images are in CMYK--they're not. They're all using the sRGB color profile.
posted by mathowie (staff) at 1:50 PM on December 4, 2012

Seconding IrFanView to open the images and resave them as JPGs. It's lighting fast in its batch conversions.
posted by Brandon Blatcher at 2:06 PM on December 4, 2012

For getting image info, the imagemagick tools include one called "identify" that is probably as good as anything. You can download them here. You can easily save the output using:
identify -verbose file.jpg > fileinfo.txt
However, I think you may be hitting a problem I ran into with large images - IE will run out of memory and just flat out refuse to load some images (red X or sometimes a missing image entirely). In our case we had maybe 10 extremely large images [approx 10,000 x 2,000) on each page, and after viewing a lot of these pages it would randomly start to fail to load some images - restarting IE would make the exact same page work fine. It never crashed and the more sane sized images would always load ok - just some of the huge ones would fail to load at random. So to eliminate that, when an image fails to load try restarting the browser and loading it again. (we fixed this by replacing the images with thumbnails and only showing one huge image at a time).

If that's not it, and you can find an image the reliably breaks IE8 then you could always post a sample - friendly Mefites will probably be able to spot the problem quickly (or feel free to mefimail me in confidence).
posted by samj at 3:13 PM on December 4, 2012

It's a bear, but my go-to for this sort of thing is Image Magick. The convert program might help. It's command line only afaik, but if you or someone else is proficient with this sort of thing, it might be useful for converting them all to a single format (which is convert's primary purpose in life) or to see if you can get convert (or any of the other tools) to spit out some relevant metadata that might help you figure out what's different about those particular images. More usage details here.

I'd try converting them all to one format, or converting from whatever they're in to BMP and back into something specific. That'll force a full re-encode which might be productive. There are other convert flags for messing with color depth and various encoding details that might also be useful. It'll do batch conversion pretty easily, as you can see in the docs.
posted by heresiarch at 3:15 PM on December 4, 2012

On post, yeah, samj has good advice too. I'd forgotten about identify. Definitely give that a shot! But in terms of repair, I think your best bet will be in convert. Unless, ofc, the problem is the size. That's definitely another plausible explanation.
posted by heresiarch at 3:18 PM on December 4, 2012

just because FF/Chrome display them fine doesn't mean it's not a problem with the images. we had a problem like that in the IE6/IE7 period - I don't remember the exact details but one version of IE refused to show some images. IIRC, the problem turned out to be thumbnails embedded in a format that one version of IE didn't like.

I'm assuming that isn't your exact problem, but confirming whether the images load fine directly from a flash drive will help narrow down whose problem this is to fix.

one other thing that made troubleshooting our issue difficult was that after loading a "broken" image, all JPEG image rendering would be flaky until a reboot. once we realized this the situation became deterministic and much easier to diagnose.
posted by russm at 5:19 PM on December 4, 2012

From the OP:
We found that the images themselves are fine, but still created smaller versions to test their behavior. These also all tested as fine. With the smaller images, IE would always display the first 10 or 12 images that were opened, and would begin failing to display them in different ways after that. This failure was not dependent on the images at all--testing a list of images in the same order, closing and reopening the browser each time, would cause fairly consistent results: IE got flaky around picture 11 or 13. But testing that same list of images from the bottom up would cause the last 10 or 12 to work and all the rest to fail. Testing them in a random order would cause different behavior yet again.

After looking into it a fair amount and trying several possible solutions, none of which worked, we determined that the odd behavior we were seeing was a fundamental flaw in IE.

We're using this system in a workplace where we have a fair amount of control over the machines, which cannot be upgraded to IE 9, so we changed the default browser on those machines. Of course we still have no control over what browser our customers use, but IE 9 can handle dozens of the images in a row, so maybe eventually the issue will be mooted. Given that IE 9 still has bugs I wrote about when IE 5 was new, that's a minor miracle.

If nothing else, it forced us to move away from IE, which can't be a bad thing.
posted by jessamyn (staff) at 1:41 PM on January 2, 2013

« Older How about a buzzcut?   |   If I go there will be trouble, and if I stay it... Newer »
This thread is closed to new comments.