smonkcaptain Posted August 10, 2010 Share Posted August 10, 2010 Hey all, I've been trying to use this Pixastic Image histogram tonight but to no avail! http://www.pixastic.com/lib/docs/actions/histogram/ I have followed all the instructions, however when i load the page nothing appears. I do have the 'test.jpg' in the same folder as the JS files too. Here is my code: <script type="text/javascript" src="pixastic.custom.js"></script> <script type="text/javascript" src="histogram.js"></script> <script type="text/javascript"> var hist = {}; var img = new Image(); img.onload = function() { Pixastic.process(img, "histogram", { average:false,paint:true,color:"rgb(255,0,0)",returnValue:{} }); } document.body.appendChild(img); img.src = "test.jpg"; // code used in the demo: var hist = {}; function demo() { Pixastic.process(document.getElementById("demoimage"), "histogram", { average : false, paint:true,color:"rgba(255,255,255,0.5)",returnValue:hist }); $("#text-histogram").val(hist.values); } </script> If you wish to source the external .js files they are: http://www.aviation-photographs.net/screeners/histogram.js http://www.aviation-photographs.net/screeners/pixastic.custom.js However they are not touched. Thanks in advanced, Jimmy Leaman... Link to comment https://forums.phpfreaks.com/topic/210389-javascript-histogram-problem/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.