NDEVR
API Documentation
IcoFile

Logic for handling files with the .ico extension. More...

Classes

struct  BitmapInfoHeader
 Windows BITMAPINFOHEADER structure used to describe the bitmap data within an ICO file. More...
struct  IconDir
 Represents the ICO file directory header, containing metadata and an array of icon entries. More...
struct  IconDirEntry
 Represents a single entry in the ICO file directory, describing one icon image. More...

Static Public Member Functions

static bool ConvertRGBAToIcon (File icon, const uint01 *rgba, Vector< 2, uint04 > size)
 Converts raw RGBA pixel data into a Windows .ico file and writes it to disk.

Detailed Description

Logic for handling files with the .ico extension.


Definition at line 11 of file ConvertToIco.h.

Member Function Documentation

◆ ConvertRGBAToIcon()

bool IcoFile::ConvertRGBAToIcon ( File icon,
const uint01 * rgba,
Vector< 2, uint04 > size )
inlinestatic

Converts raw RGBA pixel data into a Windows .ico file and writes it to disk.

Parameters
[in]iconThe destination file path to write the ICO data to.
[in]rgbaPointer to the raw RGBA pixel data (4 bytes per pixel).
[in]sizeThe width and height of the icon image in pixels.
Returns
True if the ICO file was written successfully, false if the file could not be opened.

Definition at line 65 of file ConvertToIco.h.

References cast(), IcoFile::IconDir::count, File::e_binary_write, IcoFile::IconDir::entries, icon, Vector< t_dims, t_type >::product(), IcoFile::IconDir::reserved, and IcoFile::IconDir::type.


The documentation for this class was generated from the following file: