The only way to read image data using JavaScript is a canvas. I'm out of clientside options here. JavaScript does not support any file processing, mostly for security reasons. I can't just process an image, not even if I'd write something that'd read a PNG file raw. My plan: Ajax call to the server which will send the image back as a data URI; a base64 encoded string which contains the images. Chances are you've seen that before. I can put that on the canvas, since it has no origin. I can even place it in HTML5's local storage so the server doesn't have to process the same images over and over again. I'd say that is the best solution for now.
I thought your plan was to send the zoomableimage.php file the desired images URL along with a zoom multiplier via POST and then have it become the zoomed in image.
The .php file would obviously just read in the image, quadruple each pixel using no more than a for loop and display it.
That does have the downside of having the image with the .php extension instead of .png, .jpg, etc..
I wouldn't know how to do it myself, but I just figured PHP does have image manipulation capabilities. Not possible? If it is possible then it should then work for animated .gifs as well.