Added compiler symbols to make testing more flexible for various user needs.

Added a check to make sure when reading an image the allocated memory is large enough.

git-svn-id: http://gil-contributions.googlecode.com/svn/trunk/gil_2@788 74d2078f-e420-0410-9604-315c732a9900