Javascript based image manipulator