What do you mean not possible? You can't touch pixels in an image buffer?
Is it possible that you are referring to Java rather than JavaScript?
No, I just didnt know before I asked whether browsers let JavaScript have access to the low level image information.
I mention below the best options: server side or flash.
Correction: JavaScript embedded in web pages cannot process images. Mozilla Rhino most certainly can, and I'm pretty sure Mozilla SpiderMonkey can as well if given XPConnect (or similar).