Einhugur macOS Bridge plugin. |

# NSImage.ToPicture Method

Converts the NSImage to Xojo picture object.

ToPicture(
width as Integer,
height as Integer) as Picture

#### Parameters

width
  The width of the destination picture.
height
  The height of the destination picture.

#### Returns

Picture
  The new Xojo picture object.

#### Remarks

This function takes in width and height since some NSImages contain many representations. So for example NSImage containing file icon will say its 32 x 32 but its perfectly valid to retrieve it at 256 x 256. Then best representation is chosen or it might interpolate between two representations if needed.

#### See Also

NSImage Class