Skip to content Skip to sidebar Skip to footer

Creating/modifying Images In Javascript

Is it possible to dynamically create and modify images on a per pixel level in JavaScript (on client side)? Or has this to be done with server based languaged, such as PHP? My use

Solution 1:

Solution 2:

You may want to check out Processing.js. John Resig of jQuery fame wrote it. It supports pixel processing, unfortunately only Firefox 3 can handle it sufficiently.

Solution 3:

This has to be done on the server side. One thing you might look at doing is allowing all the editing to go on client side, and then in the end POST the final image (via AJAX) to the server to allow it to return it to you as the correct MIME type, and correctly packed.

Solution 4:

Also look at data URIs (though IE versions below 8 don't support them, unfortunately!)

Solution 5:

You can imagine a set of JS tools that will allow the user to define what kind of transformation he wants to do, but the final work of transformation MUST be done on a server side. JS on the client side is unable to create a file, for security reason.

Post a Comment for "Creating/modifying Images In Javascript"