16#ifndef LIEF_PE_RESOURCE_ICON_H
17#define LIEF_PE_RESOURCE_ICON_H
35struct pe_resource_icon_group;
41 friend class ResourcesManager;
55 uint32_t
lang()
const;
61 uint8_t
width()
const;
79 uint32_t
size()
const;
82 span<const uint8_t>
pixels()
const;
95 void pixels(
const std::vector<uint8_t>& pixels);
96 void save(
const std::string& filename)
const;
102 void accept(Visitor& visitor)
const override;
110 uint8_t color_count_ = 0;
111 uint8_t reserved_ = 0;
112 uint16_t planes_ = 0;
113 uint16_t bit_count_ = 0;
114 uint32_t id_ = UINT_MAX;
116 uint32_t sublang_ = 0 ;
117 std::vector<uint8_t> pixels_;
Definition ResourceIcon.hpp:39
ResourceIcon(const details::pe_resource_icon_group &header)
void height(uint8_t height)
uint32_t lang() const
Language associated with the icon.
uint32_t sublang() const
Sub language associated with the icon.
void width(uint8_t width)
friend std::ostream & operator<<(std::ostream &os, const ResourceIcon &entry)
ResourceIcon(const ResourceIcon &)
void pixels(const std::vector< uint8_t > &pixels)
void bit_count(uint16_t bit_count)
uint8_t height() const
Height in pixels of the image.
uint16_t planes() const
Color Planes.
void color_count(uint8_t color_count)
void planes(uint16_t planes)
uint32_t id() const
Id associated with the icon.
span< const uint8_t > pixels() const
Pixels of the image (as bytes)
ResourceIcon(const details::pe_icon_header &header)
void sublang(uint32_t sublang)
uint8_t reserved() const
Reserved (must be 0)
uint8_t color_count() const
Number of colors in image (0 if >=8bpp)
ResourceIcon & operator=(const ResourceIcon &)
void accept(Visitor &visitor) const override
uint32_t size() const
Size in bytes of the image.
uint16_t bit_count() const
Bits per pixel.
void save(const std::string &filename) const
Save the icon to the given filename.
void reserved(uint8_t reserved)
uint8_t width() const
Width in pixels of the image.
The Resource Manager provides an enhanced API to manipulate the resource tree.
Definition ResourcesManager.hpp:38
Definition CodeIntegrity.hpp:26
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41