Is there a way to prevent the zoom out of the image when is already of the size of screen? And also to prevent the panning outside of the view bounds

I use this project for zoom high resolution image
https://dl.dropboxusercontent.com/u/...iewExample.zip

i want prevent the panning outside of the view bounds

I would avoid this