topical media & game development
graphic-canvas-util-pixastic-demo-histogram.htm / htm
<script type=text/javascript src=graphic-canvas-util-pixastic-pixastic-jquery.js></script>
<script type=text/javascript src=graphic-canvas-util-pixastic-pixastic-custom.js></script>
<script type="text/javascript">
function draw() {
var hist = {};
var img = new Image();
img.onload = function() {
Pixastic.process(img, "colorhistogram", {
paint:true,returnValue:hist
});
hist.rvals; // <- array[255] red channel
hist.gvals; // <- array[255] green channel
hist.bvals; // <- array[255] blue channel
}
document.body.appendChild(img);
img.src="soutine.jpg";
}
</script>
<body onload="draw();">
</body>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.