图标文件的文件格式是什么?
发布网友
发布时间:2022-04-24 16:10
我来回答
共4个回答
热心网友
时间:2023-10-21 16:57
上面的是干什么啊,。图标文件的文件格式一般是EXE和PLL的,可执行程序
热心网友
时间:2023-10-21 16:57
Icons are normally stored in ICO files. The ICO file format is documented in the Windows 3.1 SDK Programmer's Reference, Volume 4: Resources, Chapter 1: Graphics File Formats.
The ICO file starts with an ICONDIR structure. The ICONDIR structure is defined as:
typedef struct
{
WORD idReserved; // Reserved
WORD idType; // resource type (1 for icons)
WORD idCount; // how many images?
ICONDIRENTRY idEntries[1]; // entries for each image (idCount of 'em)
} ICONDIR, *LPICONDIR;
The ICONDIRENTRY structure is defined as:
typedef struct
{
BYTE bWidth; // Width of the image
BYTE bHeight; // Height of the image (times 2)
BYTE bColorCount; // Number of colors in image (0 if >=8bpp)
BYTE bReserved; // Reserved
WORD wPlanes; // Color Planes
WORD wBitCount; // Bits per pixel
DWORD dwBytesInRes; // how many bytes in this resource?
DWORD dwImageOffset; // where in the file is this image
} ICONDIRENTRY, *LPICONDIRENTRY;
So, the file consists of the header followed by the bits for each image. The bits for each image can be located by seeking to dwImageOffset in the file. The format of the bits follows:
The bits for each image are stored in something similar to CF_DIB format. First is a BITMAPINFO structure, followed by the DIB bits of the XOR mask, followed by the DIB bits of the AND mask.
Note the following two caveats:
1) The bmiHeader.biHeight member of the BITMAPINFO structure indicates the height of the XOR mask plus the height of the AND mask.
2) The AND mask is monochrome, and has no BITMAPINFO.
热心网友
时间:2023-10-21 16:58
正常情况下,图标文件扩展名为.ico,图标文件可以存储单个图案、多尺寸、多色板的图标文件。一个图标实际上是多张不同格式的图片的集合体,并且还包含了一定的透明区域。
图标有一套标准的大小和属性格式,且通常是小尺寸的。每个图标都含有多张相同显示内容的图片,每一张图片具有不同的尺寸和发色数。一个图标就是一套相似的图片,每一张图片有不同的格式。从这一点上说图标是三维的。图标还有另一个特性:它含有透明区域,在透明区域内可以透出图标下的桌面背景。在结构上图标其实和麦当劳的巨无霸汉堡差不多。
一个图标实际上是多张不同格式的图片的集合体,并且还包含了一定的透明区域。因为计算机操作系统和显示设备的多样性,导致了图标的大小需要有多种格式。
热心网友
时间:2023-10-21 16:58
。ICO