Adding sample input and output images with square detection