GraphicsFormats package for Buoy |

# RawIcoImporter.OpenFromBytes Method

Opens a ICO Image from a ICO formatted Bytes buffer, reading the bitmap by given index from the ICO file.

OpenFromBytes(
data as Bytes,
directoryIndex as Integer) as RawBitmap

#### Parameters

data
  The Bytes buffer data containing a ICO image to import from.
directoryIndex
  Index of the Bitmap to read. (First bitmap is number zero). After you have read the first bitmap then you will have the LastDirectoryIndex property populated which will give you info of how many bitmaps are in the ICO file.

#### Returns

RawBitmap
  Returns the imported Picture as RawBitmap or nil if there was error.

#### Remarks

This method can throw GraphicsFormatsException.

#### See Also

RawIcoImporter Class