You can set the NSWorkspaceDesktopImageScalingKey
in the option
parameter. Here's the possible values:
NSImageScaleProportionallyDown
If it is too large for the destination, scale the image down while preserving the aspect ratio.
NSImageScaleAxesIndependently
Scale each dimension to exactly fit destination. This setting does not preserve the aspect ratio of the image.
NSImageScaleNone
Do not scale the image.
NSImageScaleProportionallyUpOrDown
Scale the image to its maximum possible dimensions while both staying within the destination area and preserving its aspect ratio.
Declared in NSCell.h.