// Exit script if the image is not 2D
image img
if ( !GetFrontImage( img ) ) exit(0)				// Exit script if no front-image found
if ( 2 != ImageGetNumDimensions( img ) ) exit(0)	// This line: Exit script if the image is not 2D
ShowImage(img) 
