# PixStics - Discussion



## brianleighty (Jul 9, 2012)

Hello everyone, so I've been working on a script for around the past 10 months and I'm finally ready to get some feedback from other people. I named it Pixstics because it does picture statistics by taking the exif data in JPGs and compares it against the other JPGs in the set. It's all javascript based so there's no software to install and it will work offline as well once it's been loaded up at least once. If some of you guys want to check it out and see what you think:
http://leightyphotography.com/PixStics/
I'd love to hear your feedback on it. Thanks.


----------



## brianleighty (Jul 10, 2012)

*Re: PixStics*

Forgot to mention, even though it mentions it in the link, this requires either Firefox or Chrome. IE and Safari both don't have the FileReader method needed to make it work.

Just to give you a few examples of what you can do, let's say you want to know what focal length or lens you use the most. Then you want to break that down and find out in each of those groups how many pictures you rated as 5 stars. Or perhaps what shutter speed you use at what focal length or what aperture you use the most. The possibilities are pretty broad since there are 11 properties I believe and so if I'm doing my math right it should be a total of 121 (11 x 11). 

As I say on the site, none of your data gets uploaded to the server and if you want to test this load up the page. After it's fully loaded disable your wifi or lan connection and then refresh the page. Everything should still work. The only thing that ever sends an data is if you want to export the graph as this uses Highcharts server for creating the output file. Anyways take a look and see what you think.


----------



## PeterJ (Jul 10, 2012)

*Re: PixStics*

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.


----------



## nightbreath (Jul 10, 2012)

*Re: PixStics*



PeterJ said:


> 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.



This might happen when you process big amount of data in a row due to timeouts in browsers. Brian, if there's an issue you'd be stuck with you can contact me so I can look at the script with you.


----------



## bvukich (Jul 10, 2012)

*Re: PixStics*

Very cool, even works in chrome on Linux 

Doesn't go down through a directory tree though, which is inconvenient.


----------



## adhocphotographer (Jul 10, 2012)

*Re: PixStics*

Looks awesome...

Tried it on 65 jpegs (large as i have edited them), and got stuck at "processing 65 of 65" for about 10 mins now. I guess it is due to the large number of photos? Does the file size make a difference (apart from maybe eating up some ram)?

Good work, i really like it... hopefully i can check out my results soon/


----------



## rpt (Jul 10, 2012)

*Re: PixStics*

Fabulous! I have always wanted something like this. I was going to write a program to do this and now do not need to! 
I did 237 files (JPGs from my 5D3) using Chrome on XP-SP3 and it worked great. Compared Shutter speed vs Focal Length. ISO vs Shutter speed etc. I have passed the link on to some enthusiasts at my work place.

Thank you!


----------



## candyman (Jul 10, 2012)

*Re: PixStics*

Excellent!
I just used it on 59 JPG's (using Chrome on Win7)
It was fast when changing the parameters (I switched form apeture to ISO to Shutterspeed to Focal Length) and rebuilding the graph almost instantly.
I will check it with larger files as well and als with higher quantity.


Thanks for offering this great tool!


----------



## brianleighty (Jul 10, 2012)

*Re: PixStics*



nightbreath said:


> PeterJ said:
> 
> 
> > 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.
> ...



Thanks nightbreath. I don't think that's the issue. I've done test up to 5000 pictures that took almost a minute to process. If you'd like to help out with issues (especially ones that you can recreate and figure out what's going on that'd be cool.


----------



## brianleighty (Jul 10, 2012)

*Re: PixStics*



bvukich said:


> Very cool, even works in chrome on Linux
> 
> Doesn't go down through a directory tree though, which is inconvenient.


Unfortunately that's a limitation of FileReader  You can add additional files on after the initial set though so that's one option. The other is to go into the folder you wish to have all the subfolders selected and just do a search for jpg files and then drag all the files over.


----------



## brianleighty (Jul 10, 2012)

*Re: PixStics*



PeterJ said:


> 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.


----------



## brianleighty (Jul 10, 2012)

*Re: PixStics*



adhocphotographer said:


> Looks awesome...
> 
> Tried it on 65 jpegs (large as i have edited them), and got stuck at "processing 65 of 65" for about 10 mins now. I guess it is due to the large number of photos? Does the file size make a difference (apart from maybe eating up some ram)?
> 
> Good work, i really like it... hopefully i can check out my results soon/


adhoc, if you could read my response to Peter and follow the same thing, if it's on 65 of 65 then it's already switched over to building the graphs which is probably where the issue is. If you could pull up the the error console. If you're in Chrome, right click on any element on the page and click inspect element. Down in the lower left you should see something similar to >= except with 3 lines instead of 2. If you click on that then I'm guessing you'll see an error. If you could let me know what that is and the information I requested from Peter as well I'll try to fix it. Regarding sizing, I've run sets of 5000 pictures in the 3 - 5 MB range and haven't had issues with it so definitely not a size issue.


----------



## brianleighty (Jul 10, 2012)

*Re: PixStics*



rpt said:


> Fabulous! I have always wanted something like this. I was going to write a program to do this and now do not need to!
> I did 237 files (JPGs from my 5D3) using Chrome on XP-SP3 and it worked great. Compared Shutter speed vs Focal Length. ISO vs Shutter speed etc. I have passed the link on to some enthusiasts at my work place.
> 
> Thank you!


Thanks rpt. I'm glad to hear it's working right for somebody  Yeah, I've had the idea for a while too. I didn't realize it until after I started working on this but there are actually a few other options available. They're pretty limited in what they can do though and they were all PC only if I remember correctly. Feel free to share this with as many as you like. I think it would be a great tool for photographers buying decisions.


----------



## brianleighty (Jul 10, 2012)

*Re: PixStics*



candyman said:


> Excellent!
> I just used it on 59 JPG's (using Chrome on Win7)
> It was fast when changing the parameters (I switched form apeture to ISO to Shutterspeed to Focal Length) and rebuilding the graph almost instantly.
> I will check it with larger files as well and als with higher quantity.
> ...


Thanks candyman, I'm glad with how it turned out. I was worried when I started it might run real slow. The only one that seems to take quite a while sometimes is focal length if you set the detail to 4 and you have a really large set of images. Still not terribly long and it's cool seeing all that data.


----------



## picturesbyme (Jul 10, 2012)

*Re: PixStics*

Looks good, I used something similar (http://www.snapfiles.com/get/ExposurePlot.html) before but will give this a try. The planned add-ons look promising too. Thanks.


----------



## brianleighty (Jul 10, 2012)

*Re: PixStics*



picturesbyme said:


> Looks good, I used something similar (http://www.snapfiles.com/get/ExposurePlot.html) before but will give this a try. The planned add-ons look promising too. Thanks.


Yeah that's one of the ones I found while working on this project. Which of the planned add-ons would you be most interested in? Also is there anything else that you think would be useful to add?


----------



## picturesbyme (Jul 10, 2012)

*Re: PixStics*

The duplicate finder/remover and the group by camera would be pretty interesting.


----------



## crasher8 (Jul 10, 2012)

*Re: PixStics*

Kudos to you and your cool idea. I look forward to v 2.0 and future updates. Thanks!


----------



## brianleighty (Jul 10, 2012)

*Re: PixStics*



picturesbyme said:


> The duplicate finder/remover and the group by camera would be pretty interesting.


Got it. Thanks. If others concur I'll prioritize those first.


----------



## brianleighty (Jul 10, 2012)

*Re: PixStics*



crasher8 said:


> Kudos to you and your cool idea. I look forward to v 2.0 and future updates. Thanks!


Any ideas besides what I've already listed for v2.0?


----------



## RLPhoto (Jul 10, 2012)

*Re: PixStics*

This is a great idea! Now just program it to run inside of LR4's internal archive and work inside our catalogs. Then Sell it for 9.99$ as an add-on and I'd be happy to purchase this. 8)


----------



## brianleighty (Jul 10, 2012)

*Re: PixStics*



RLPhoto said:


> This is a great idea! Now just program it to run inside of LR4's internal archive and work inside our catalogs. Then Sell it for 9.99$ as an add-on and I'd be happy to purchase this. 8)


I'm afraid that will never happen. I honestly can't take credit for very much of this project. I actually built very little of it and instead am using existing scripts combined together to do what I wanted it to. I would never feel comfortable charging for this since it's really not mine to sell and thus will always be free. I'm sure figuring out ways to improve the scripts integration with existing workflows would be nice and if it's possible then I'd be willing look into trying to build some of that in but I honestly don't know where you would start with that.


----------



## Mt Spokane Photography (Jul 10, 2012)

*Re: PixStics*

Works fine for me, Its a neat exercise.
Since I use lightroom, I can see 4 parameters of my chosing at once, and drill down thru subdirectories as well as see stats for raw images, which all of mine are. 100,000 images takes just a seciond or two.


----------



## brianleighty (Jul 10, 2012)

*Re: PixStics*



Mt Spokane Photography said:


> Works fine for me, Its a neat exercise.
> Since I use lightroom, I can see 4 parameters of my chosing at once, and drill down thru subdirectories as well as see stats for raw images, which all of mine are. 100,000 images takes just a seciond or two.


Sounds interesting. I'll have to check out a demo of lightroom to see what you're talking about. My guess is they must have a database they're using. Not a bad idea if I could do something similar of a database client side with all the information need then it could almost become more of an index thing for more long term use. One other thing I'm planning on is even further segmenting than the two properties right now. I just have to figure out which way to move forward as the graphs are limited to 2 properties so I have to segment it a different way.


----------



## PeterJ (Jul 12, 2012)

*Re: PixStics*



brianleighty said:


> PeterJ said:
> 
> 
> > 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.
> ...


Hi Brian, I had a chance to do some more testing today and I do get a Firebug error:

exifData.subifd is undefined
http://leightyphotography.com/PixStics/js/customJavascript.js Line 282

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.


----------



## brianleighty (Jul 12, 2012)

*Re: PixStics*



PeterJ said:


> brianleighty said:
> 
> 
> > PeterJ said:
> ...



Thanks Peter. Not sure how personal that photo is. If you'd be willing to email to me it'd be great to be able to test it myself. It can be as small as you want as long as it have the exif data untouched. If it does indeed have the aperture then it would seem strange that that property is missing. The email address if you don't mind sending it is contact at leightyphotography.com. If it's a personal picture then I can try and make some changes and have you try testing it but it be much more helpful to do multiple test on my own if you don't mind. Thanks for everyone's help. I'm currently working on building in duplicate file detection and if I get enough request for it will build in the splitting by camera or lens.


----------



## rpt (Jul 12, 2012)

*Re: PixStics*



PeterJ said:


> brianleighty said:
> 
> 
> > PeterJ said:
> ...



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.


----------



## brianleighty (Jul 12, 2012)

*Re: PixStics*



rpt said:


> PeterJ said:
> 
> 
> > brianleighty said:
> ...


I don't do too much with try and catch. I guess mostly 'cause I don't understand it well enough and simple if statements work most of the time but yes that is my plan if I can't get the original file. However, I would prefer to know why it's not getting defined in the first place because that means that the aperture data isn't getting read properly which is very odd given that's not a maker specific property where there are most of the issues. Thanks for your input rpt. If you have any good links to a tutorial that explains try catch in javascript well I'd be interested to read it.


----------



## rpt (Jul 12, 2012)

*Re: PixStics*



brianleighty said:


> rpt said:
> 
> 
> > PeterJ said:
> ...



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* be executed. 

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...).

Do a google search for *javascript try catch block* and I am sure you will find a ton of links.


----------



## brianleighty (Jul 16, 2012)

*Re: PixStics*

Just wanted to let everyone know I'm currently working on several fixes/improvements to the script. Hopefully will have a new version up sometime this week or next week.


----------



## rpt (Jul 16, 2012)

*Re: PixStics*

Great! Look forward to the update. Let me know if you need any other clarifications.


----------



## brianleighty (Jul 24, 2012)

So I just released the latest version. I'd like to give a special thanks to PeterJ who gave me a JPG that was causing issues I was not only able to solve the issue but add functionality at the same time. His picture was missing the regular Exif fields but had the data in metags. I added searching of these so that it will pull the information out. I was working off of only one picture so I'd love to hear some feedback if someone is able to test this out. I've started another thread where I will announce release in case anyone wants to be notified when I release a new version. You can view it here:
http://www.canonrumors.com/forum/index.php?topic=8203.0
As I say in that thread though, please try to keep discussion to this thread. Thanks.


----------



## brianleighty (Nov 19, 2012)

Just released a new version of Pixstics. You can get all the details on it here:
http://www.canonrumors.com/forum/index.php?topic=8203.msg197489#msg197489


----------

