Fixed updating of image layer

When changing the transparent color or the image of an image layer,
the item was not resizing and repainting correctly.