Sets a new PDF layer object for the image object.
If the smart pointer to a PDF layer object is null, it means that the image object doesn't belong to any layer.