Make sure that stamp image has always positive dimensions (FF issue)

[#76530828]

Firefox throws an error when we try to draw an image with negative
dimensions on canvas (works fine in other browsers).