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

# TIcnsIcon

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Implements a macOS Icon Resource file.

## Declaration

Source position: graphics.pp line 1719

`type TIcnsIcon = class(TCustomIcon)`
`protected`
`class function GetSharedImageClass; override;` |  | Gets the class reference used to create the shared image for the icon.
`procedure ReadData(); override;` |  | Reads icon data from the specified stream, and performs byte order conversion when needed.
`procedure ReadStream(); override;` |  | Reads each of the icon resources from the specified stream, and adds them to the list of icon images.
`procedure WriteStream(); override;` |  | Writes each of the icon resources in the list to the specified stream.
`public`
`constructor Create; override;` |  | Constructor for the class instance.
`destructor Destroy; override;` |  | Destructor for the class instance.
`class function GetFileExtensions; override;` |  | Gets the file extension(s) used for the icon type.
`function LazarusResourceTypeValid(); override;` |  | Checks whether the specified Resource Type name is valid for the icon type.
`end;`

## Inheritance

`TIcnsIcon` |  | Implements a macOS Icon Resource file.
`TCustomIcon` |  | TCustomIcon - base class for TIcon.
`TRasterImage` |  | TRasterImage - base class for a number of graphic controls, including TCustomBitmap and TCustomIcon, which use a raster of dots to display graphic information.
`TGraphic` |  | Abstract base class used for images in supported image formats.
`TPersistent`
?
`TObject`

## Description

TIcnsIcon is a TCustomIcon descendant which implements a class used for macOS Icon resources. TIcnsIcon is similar to the .ICO format used on Windows platforms. An Icns Icon can store one or more images, which generally use the PNG image format. Standard icon sizes used in Icns Icon files include: 16x16, 32x32, 48x48, 128x128, 256x256, 512x512, and 1024x1024 pixels.

## See also

TCustomIcon |  | TCustomIcon - base class for TIcon.