Returns the recommended layer contents scale for this image.
SDK
- macOS 10.7+
Framework
- App
Kit
Declaration
Parameters
preferredContentsScale
The preferred layer contents scale. Don't use a higher scale factor if the image can't provide it. If the image is resolution independent the return value will be the same as the input. If you specify
0
for this parameter, the method uses the scale factor for the default screen..0
Return Value
The recommended layer contents scale. This scale factor may be different than the one in the preferred
parameter.
Discussion
Use this method to obtain the scale factor value that you pass to the layer
method. This method uses the image data to determine the scale factor that is best suited for creating an image that looks good in the layer.