please follow this link to: http://mln-web.cs.odu.edu/~mln/code/code/ch11/resize.html