FLTK 1.4.0
Loading...
Searching...
No Matches
Fl_ICO_Image.H
1//
2// ICO image header file for the Fast Light Tool Kit (FLTK).
3//
4// Copyright 2022-2023 by Bill Spitzak and others.
5//
6// This library is free software. Distribution and use rights are outlined in
7// the file "COPYING" which should have been included with this file. If this
8// file is missing or damaged, see the license at:
9//
10// http://www.fltk.org/COPYING.php
11//
12// Please report all bugs and problems on the following page:
13//
14// http://www.fltk.org/str.php
15//
16
17// https://en.wikipedia.org/wiki/ICO_(file_format)
18// http://www.daubnet.com/en/file-format-ico
19
20#ifndef Fl_ICO_Image_H
21# define Fl_ICO_Image_H
22# include "Fl_BMP_Image.H"
23
27class FL_EXPORT Fl_ICO_Image : public Fl_BMP_Image {
28
29public:
41
42 Fl_ICO_Image(const char *filename, int id = -1, const unsigned char *data = NULL, const size_t datasize = 0);
44
46 int idcount() const { return idcount_; }
47
49 const IconDirEntry * icondirentry() const { return icondirentry_; }
50
51private:
52 int idcount_;
53 struct IconDirEntry *icondirentry_;
54 void load_ico_(class Fl_Image_Reader &rdr, int id);
55};
56
57#endif // Fl_ICO_Image_H
The Fl_BMP_Image class supports loading, caching, and drawing of Windows Bitmap (BMP) image files.
Definition Fl_BMP_Image.H:28
The Fl_ICO_Image class supports loading, caching, and drawing of Windows icon (.ico) files.
Definition Fl_ICO_Image.H:27
const IconDirEntry * icondirentry() const
Returns the array of idcount() loaded IconDirEntry structures.
Definition Fl_ICO_Image.H:49
int idcount() const
Returns the number of icons of various resolutions present in the ICO object.
Definition Fl_ICO_Image.H:46
Definition Fl_Image_Reader.h:32
Windows ICONDIRENTRY structure
Definition Fl_ICO_Image.H:31
int bHeight
Image height.
Definition Fl_ICO_Image.H:33
int wBitCount
Bits per pixel.
Definition Fl_ICO_Image.H:37
int bWidth
Image width.
Definition Fl_ICO_Image.H:32
int wPlanes
Color Planes.
Definition Fl_ICO_Image.H:36
int dwImageOffset
Offset to the image.
Definition Fl_ICO_Image.H:39
int dwBytesInRes
Resource size in bytes.
Definition Fl_ICO_Image.H:38
int bReserved
Reserved.
Definition Fl_ICO_Image.H:35
int bColorCount
Number of colors (0 if ≥ 8bpp)
Definition Fl_ICO_Image.H:34