I am looking to explore the feasibility of writing a simple greasemonkey script / chrome userscript to convert all the images loaded in the browser window to grayscale/black and white. The ultimate goal is to perform more complex image processing. What I would like to do is write a script to add an onload function containing something like the following:
var images = document.getElementsByTagName("img");
for (var i = 0; i < images.length; ++i) {
filter(images[i]);
}
I know this sort of thing can be done on the same domain the page is loaded from (i.e. built into the website ui logic), but from what I've read and some early experimentation I've done (with html5 canvases), I'm wondering if it is feasible to perform from the client side via plugin because of crossdomain problems and other issues. Can anyone tell me if this is a feasible project, are there any tutorials or similar projects I might use as a reference?
Thanks.
I would say that if you have a purpose for this script that it would be feasable to make the userscript.
I would recommend you look at this link, because I imagine it will help you tremendously.