There is serious bug in the last contribution. Using the filename as image's name ex. resize.php?image=index.php anyone can read the file contents.

Corrected file attached.

More...