I’ve added versions of my image resizers to my public repo on GitHub, you can view all the code at the following link, there is a jpeg, gif and png version of the resizer. https://github.com/g3d-development/zend-helpers/tree/master/library/G3d/Image
To see working examples either download the repo and set up the sample site or alternatively view the examples directly in the view file. https://github.com/g3d-development/zend-helpers/blob/master/application/modules/module/views/scripts/resizer/index.phtml
Working examples will be added to the sample project soon(tm).