[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Graphics' (#lcl)

# TCustomIcon.AssignImage

Copies image data from the source image to the current icon image.

## Declaration

Source position: graphics.pp line 1655

`public procedure TCustomIcon.AssignImage(`
`ASource: TRasterImage`
`); virtual;`

## Arguments

`ASource` |  | Image with the values assigned to the current icon image.

## Description

AssignImage is used to copy image data from ASource to the currently selected image for the icon.

AssignImage is typically used to assign the icon image when Add is used to create a new icon image with the required attributes (PixelFormat, Height, Width). AssignImage is called from the Assign method to store a single raster image to the icon.

## See also

TCustomIcon.Add |  | Add - an Icon formatted as AFormat, with specified Height and Width.
TCustomIcon.Assign |  | Copies values from the specified persistent object into the current class instance.