icoextract.base_extractor

class BaseIconExtractor(abc.ABC):

Base icon extractor class containing .ico writing logic.

@abc.abstractmethod
def list_group_icons( self) -> list[tuple[icoextract.types.ResourceID, list[tuple[icoextract.types.GroupIconDirEntry, int, int]]]]:

Returns all group icon entries as a list of (resource ID, group icon dir entry) tuples.

def export_icon( self, filename: str, num: int = 0, resource_id: int | str | None = None) -> None:

Exports ICO data for the requested group icon to filename.

Icons can be selected by index (num) or resource ID. By default, the first icon in the binary is exported.

def get_icon(self, num: int = 0, resource_id: int | str | None = None) -> _io.BytesIO:

Exports ICO data for the requested group icon as a io.BytesIO instance.

Icons can be selected by index (num) or resource ID. By default, the first icon in the binary is exported.