Added an assertion on the image using GD