Layer.setSizeToImageSize

Function/Meaning

Match the layer display size to the image size

Type
Layerclassmethod of
Syntax
setSizeToImageSize()
Arguments
Return value
None (void)
Explanation

Make the display size of the layer the same as the image size.
Resizing the image Many operations do not change the display size, but you can use this method to make the display size the same as the image size.