Cool idea and nice user interface. I seem to have a problem though when I drop more than about half a dozen photos, it gets stuck at 'Processing 7 of 8' for example. It seems like it's actually loaded them if I go ahead and select some charts, it just doesn't report them as loaded. The JPEG files I was trying are about 5MB each and I'm using FF 13.0.1.
Peter, do you have firebug installed? If you do, would you mind pulling up the console and letting me know if you see an error there? My guess is there's so bit of code that's failing AFTER the files get read in. It shouldn't have anything to do with the size of the files. I wrote it so that it only reads the first 32KB of each file since the EXIF data should easily be contained within that space. Also, do you have Chrome installed? If so, could you try running it in there as well? I did most of the development in Chrome but I did do limited testing in Firefox and everything seemed to work there. Also, if you could let me know what properties and detail levels and chart type you have it set at that would help too. Thanks.
Hi Brian, I had a chance to do some more testing today and I do get a Firebug error:
exifData.subifd is undefined
Line 282 is:
simplifiedData['aperture'] = exifData['subifd']['f-stop'];
I've also tracked it down to one particular image Nikita.jpg (posting name here so I don't forget which) and all works fine if I deselect that image. Doing a right-mouse click it does contain aperture information and all the other usual fields and nothing appears much different to other images in the folder. Let me know if you want me to e-mail the image.
P.S. This happened with all the chart options set at their defaults as per when the page is first loaded.
Brian, don't mean to teach you to suck eggs... You could put your code in a try/catch/finally block and ignore the files causing errors.
It is quite simple actually. You put your code in the try
block. The interpreter (in this case) will try to execute it. If an exception is encountered - missing variable/object etc., an exception will be trhown and if you have written a catch
block, that block of code will be executed. The finally
block will always
So in the catch
block you can write code to take appropriate action like skip this file processing and continue
back to the top of the for
loop. You would also put debug statements (and put try/catch
blocks around those statements where you expect exceptions to occur again...).
In your case I am not sure you need a finally
block. It is used to do cleanup that is common to the code in the try and catch blocks (instead of duplicating the code in those two blocks...).
and I am sure you will find a ton of links.