2#include <NDEVR/Vector.h>
69 BitmapInfoHeader bmpInfoHeader = { 40,
cast<sint04>(size[X]),
cast<sint04>(size[Y]) * 2, 1, 32, 0,
static_cast<uint32_t
>(image_size), 0, 0, 0, 0};
76 static_cast<uint01>(size[X]),
77 static_cast<uint01>(size[Y]),
85 icon.getParentDirectory().create(
false);
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
@ e_binary_write
Open for binary writing.
Logic for handling files with the .ico extension.
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.
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
constexpr t_type product() const
Returns the product, or value of each dimension multiplied together.
The primary namespace for the NDEVR SDK.
uint16_t uint02
-Defines an alias representing a 2 byte, unsigned integer -Can represent exact integer values 0 throu...
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
int32_t sint04
-Defines an alias representing a 4 byte, signed integer.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
@ icon
Icon identifier for the object.
constexpr t_to cast(const Angle< t_from > &value)
Casts an Angle from one backing type to another.
Represents a single entry in the ICO file directory, describing one icon image.
uint02 bitCount
Bits per pixel.
uint01 reserved
Reserved, should be 0.
uint01 colorCount
Number of colors in the color palette (0 if more than 256).
uint02 planes
Number of color planes (should be 1).
uint01 height
Height of the icon image in pixels (0 means 256).
uint04 bytesInRes
Size of the image data in bytes.
uint04 imageOffset
Offset of the image data from the beginning of the file.
uint01 width
Width of the icon image in pixels (0 means 256).
Represents the ICO file directory header, containing metadata and an array of icon entries.
IconDirEntry entries[1]
Array of icon directory entries (variable length).
uint02 reserved
Reserved, should be 0.
uint02 type
Resource type (1 for icons, 2 for cursors).
uint02 count
Number of icon images in the file.