Encyclopedia of fire safety

ico format what. How to save an image in ico format quickly and easily? How to Install the Plugin for .ico Extensions in Photoshop

ICO files contain one or more images with multiple sizes and color depths, allowing them to be scaled accordingly. In Windows, all executable files that are located on the desktop, in the Start menu, or in Windows Explorer must have an icon in ICO format. What is this file?

For example, this is the computer icon that you can see on the desktop as "My Computer", as well as the palette image that represents the Paint program. ICO files are closely related to CUR files. How do they differ from each other?

The CUR file format is an almost identical graphical format for non-animated cursors in Microsoft Windows. The only differences between the two file types are the bytes used to identify them, and the addition of an access point to the CUR header. The hotspot is defined as the pixel offset (in x, y coordinates) from the top left corner of the cursor image where the user actually points to the mouse.

Format history: what is ICO

These files appeared in the very first Windows distributions. Over time, they have changed markedly.

Icons introduced in Windows 1.0 were 32x32 pixels and were monochrome. Support for 16 colors was introduced in Windows 3.0.

Win32 introduced support for up to 16.7 million colors (Truecolor) and 256x256 pixels in size. Windows 95 also had a new Device Independent Bitmap (DIB) engine. However, only 256 colors were used for icons in this version of the OS. It was possible to enable the 65535 (Highcolor) colors by changing the value of the Shell command line icon in the registry, or by purchasing the Microsoft Plus! for Windows 95.

The Shell setting allowed larger icons instead of 32x32 in the ICO file. What is it meant? One file could store any image size from 1x1 to 256x256 pixels (including non-square sizes) with 2 (rarely used), 16, 256, 65535, or 16.7 million colors. However, in practice, the "shell" still could not display icons of a large range of colors. The Windows taskbar notification area was limited to 16 shades by default until the release of Windows Me. This meant that regardless of the settings, the icons were displayed on the screen in the same way.

Subsequent development

Windows XP added support for 32-bit color (16.7 million colors plus alpha transparency), which allowed translucent areas such as shadows, anti-aliasing, and glassy effects to be displayed in an icon. This OS distribution used 48x48 pixel icons in Windows Explorer by default. Windows XP could be configured to display all icons at 256x256 (by changing the size values ​​in Shell), but selective editing was not available. Microsoft support recommended setting icon sizes to 48x48 pixels for the XP version.

In Vista version

Windows Vista added the ability to display 256x256 pixel icons in File Explorer, as well as support for the compressed PNG format. Even though compression is not technically required, Microsoft Support has recommended that all 256x256 icons in ICO files be saved as PNG. This allowed to reduce the overall file size.

Windows Vista Explorer supported smooth scaling of icons to non-standard sizes, which were displayed on the fly, even if there was no image in the file itself. This OS distribution added a slider to "scale" icon sizes in general. When using a higher resolution and DPI mode, it was recommended to use larger icon formats (for example, 256x256).

Icon resource structure

The storage format for icon files in Microsoft Windows is as follows. An ICO or CUR consists of an ICONDIR ("Icon Directory") structure containing an ICONDIRENTRY dataset for each image in the file, followed by a contiguous block of all bitmap images (which may be in Windows BMP format, excluding the BITMAPFILEHEADER structure, or in PNG format, stored in full).

Images with a depth of less than 32 bits correspond to a specific format: the picture is encoded as one, consisting of a color mask (XOR) along with an opacity mask. In this case, the first must precede the second inside the bitmap data. If the picture is stored in order from bottom to top, the XOR mask will be drawn below the opaque one.

The size of the latter is 1 bit per pixel, regardless of the color depth specified in the BMP header. The opacity mask specifies which pixels are fully transparent and which are not. XOR corresponds to the bit depth indicated in the BMP header and specifies the numerical value of the color or palette for each pixel. Together, both masks create an opaque image, which is a picture with 1-bit transparency; they also allow background inversion. The height of the image in the ICONDIRENTRY structure of ICO and CUR files takes on the value of its intended dimensions (after the masks are laid out), while the height definition in the BMP header is determined before they are laid out. For this reason, the masks must have the same dimensions, and the height specified in the BMP header must be twice as high as in the ICONDIRENTRY structure.

Updated structure

What is ICO-32? This format is a 24-bit image with an 8-bit alpha channel added. Thus, masks are not required in 32-bit images, but their use is still recommended for better viewing of the image.

Windows XP and above started using the 32-bit image in True color mode, building an AND mask based on the alpha channel in cases where the 24-bit version is not present in the ICO/CUR file. However, earlier versions of Windows interpret all pixels at 100% opacity unless the corresponding mask is provided with an image.

Reference image data

All image data that references directory entries comes directly from it. The common practice is to store them in the same order as they are in the image directory.

Thus, if the image is stored in BMP format, it must exclude the public BITMAPFILEHEADER structure, while if it is stored in PNG format, it must be stored in its entirety.

Number of bits

The classic bitmap format BITMAPINFOHEADER supports saving it at 32 bits per pixel. When recorded as a stand-alone BMP file, its division is not used. However, when the same data is stored inside an ICO or CUR file, Windows XP (the first version of Windows to support the ICO/CUR file format with more than 1 bit of transparency) and above interprets this byte as an alpha value.

Although Microsoft's technical documentation states that this value should be zero, the .NET built-in icon encoder (System.Drawing.Icon.Save) sets it to 255. The operating system seems to ignore this value entirely in practice.

Setting color planes to 0 or 1 is treated equivalently by the operating system, but if set above 1, this value must be multiplied by bits per pixel to determine the final color depth of the image. It is not known whether different versions of the Windows operating system are tolerant of different color plane values.

Bits per pixel can be set to zero, but can also be inferred from other data. In particular, if the bitmap is not PNG compressed, then they can be calculated based on the length of the bitmap data relative to its size. If the bitmap is compressed by PNG, the bits per pixel are stored in that file's data.

It is not known if the various versions of the Windows operating system contain a formula to determine the bit depth for all capabilities if this value is set to zero.

PNG format

Windows Vista introduced the ability to read PNG images from ICO and CUR formats. A PNG can be saved in the same way as a standard BMP icon in Windows Icon format, except that the image must be stored in its entirety, along with its file header.

icon library

The icon library is a way to install Windows icons. This is usually an executable 16-bit or 32-bit binary file with an .ICL extension. It has icon files used as icons. Windows Vista and later do not support viewing icons below 16-bit.

This is the basic information regarding the ICO file format (what it is in simple terms). Simply put, this is the icon of any application or directory on the computer. It is part of the GUI and can refer to any file, window, directory, device driver, OS element, and so on. When you click on such an icon, some expected action occurs.

Separately, it is worth noting icons that contain only links to applications or data, known as shortcuts. They, too, are currently denoted by ICO format files. What else is remarkable about this kind of files?

Above, the technical characteristics of such an icon in ICO format were indicated, but what pictures can be used in these files? Certain images are built into the operating system and are offered by default. However, due to their uniformity, a trend has arisen to create different icons or even groups of them, which is done by independent artists.

If your computer has antivirus program can scan all files on the computer, as well as each file individually. You can scan any file by right-clicking on the file and selecting the appropriate option to scan the file for viruses.

For example, in this figure, file my-file.ico, then you need to right-click on this file, and in the file menu select the option "scan with AVG". Selecting this option will open AVG Antivirus and scan the file for viruses.


Sometimes an error can result from incorrect software installation, which may be due to a problem that occurred during the installation process. It may interfere with your operating system Associate your ICO file with the correct software application, influencing the so-called "file extension associations".

Sometimes simple reinstalling GIMP can solve your problem by properly linking the ICO to GIMP. In other cases, file association problems may result from bad software programming developer, and you may need to contact the developer for further assistance.


Advice: Try updating GIMP to the latest version to make sure you have the latest fixes and updates.


This may seem too obvious, but often the ICO file itself may be causing the problem. If you received a file via an email attachment or downloaded it from a website and the download process was interrupted (for example, by a power outage or other reason), the file may be corrupted. If possible, try to get a fresh copy of the ICO file and try to open it again.


Carefully: A corrupted file can cause collateral damage to previous or existing malware on your PC, so it's important to keep your computer up to date with an up-to-date antivirus.


If your ICO file associated with the hardware on your computer to open the file you may need update device drivers associated with this equipment.

This problem usually associated with media file types, which depend on the successful opening of the hardware inside the computer, for example, sound card or video card. For example, if you are trying to open an audio file but cannot open it, you may need to update sound card drivers.


Advice: If when you try to open an ICO file you get .SYS file related error message, the problem could probably be associated with corrupted or outdated device drivers that need to be updated. This process can be facilitated by using driver update software such as DriverDoc.


If the steps didn't solve the problem and you are still having problems opening ICO files, this may be due to lack of available system resources. Some versions of ICO files may require a significant amount of resources (eg. memory/RAM, processing power) to open properly on your computer. This problem is quite common if you are using fairly old computer hardware and a much newer operating system at the same time.

This problem can occur when the computer is having a hard time completing a task because the operating system (and other services running in the background) can consume too many resources to open ICO file. Try closing all applications on your PC before opening Icon File. By freeing up all available resources on your computer, you will ensure the best possible conditions for trying to open the ICO file.


If you completed all the above steps and your ICO file still won't open, you may need to run hardware upgrade. In most cases, even with older hardware versions, the processing power can still be more than enough for most user applications (unless you're doing a lot of CPU-intensive work like 3D rendering, financial/science modeling, or media-intensive work) . In this way, it is likely that your computer does not have enough memory(more commonly referred to as "RAM", or RAM) to perform the task of opening a file.

The most common problem that prevents users from opening this file is an incorrectly assigned program. To fix this in Windows, you need to right-click on the file, in the context menu, move the mouse over the "Open with" item, and select the "Choose a program ..." item from the drop-down menu. As a result, you will see a list of installed programs on your computer, and you can select the appropriate one. We also recommend checking the box next to "Use this app for all ICO files".

Another problem that our users also encounter quite often is that the ICO file is corrupted. This situation can arise in many cases. For example: the file was not fully downloaded as a result of a server error, the file was damaged initially, etc. To fix this problem, use one of the recommendations:

  • Try to find the desired file in another source on the Internet. You may be lucky to find a better version. Google search example: "File filetype:ICO" . Just replace the word "file" with the name you want;
  • Ask to send you the original file again, it may have been damaged during transfer;

Format ICO similar to the format CUR(Windows cursors) for storing cursors. The difference lies in the numerical value of one field in the header structure, and the interpretation of the values ​​of the other two fields in the same structure.

One ICO-file contains one or more icons, the size and color of each of which is set separately. The size of the icon can be any, but the most commonly used square icons are 16, 32, and 48 pixels. Icons with sizes of 24, 40, 60, 72, 92, 108, 128 pixels are also used.

Starting with Windows 98/2000, the format supports embedding JPEG and PNG images, but icon data is typically stored uncompressed.

Icons come in natural color (True Color , 24-bit color depth), High Color (16-bit color depth), or fixed palette (256, 16, or just 2 colors). In this case, the number corresponding to each pixel indicates not the color, but the number of the color in the palette.

In terms of their structure, the images in the ICO file are closest to BMP, but fundamentally differ from them in the presence of an additional image - a mask superimposed on the background using the bitwise AND operation, which allows for (full) transparency of the picture. Subsequent XORing of the main image can even produce "inverted" pixels in places where the background has not been masked out.

In addition, starting with Windows XP, 32-bit icons are supported - each pixel corresponds to 24-bit color and an 8-bit alpha channel, allowing for 256 levels of partial transparency. Using the alpha channel, you can display icons with smooth (blurred) edges and a shadow that blends with any background; the mask is ignored in this case.

Image Information Catalog

Represents consecutive records of a fixed size (16 bytes) following one after another. The number of entries is determined by the header's count field.

Field Bias Size
(in bytes)
Description
width 0 1 Specifies the width of the image in pixels. Can take values ​​from 0 to 255 . If 0 is specified, then the image is 256 pixels wide.
height 1 1 Specifies the height of the image in pixels. Can take values ​​from 0 to 255 . If 0 is specified, then the image is 256 pixels high.
colors 2 1 Specifies the number of colors in the image's palette. Must be 0 for full color icons.
reserved 3 1 Reserved. Must be 0. Microsoft's technical documentation states that this value should always be 0, but icons that are generated by the .NET built-in tools (System.Drawing.Icon.Save) have a value of 255 in this field.
planes 4 2
  • B.ICO determines the number of planes. May be 0 or 1.
  • B.CUR defines the horizontal coordinate of the "hot spot" in pixels, relative to the left edge of the image.
bpp 6 2
  • B.ICO defines the number of bits per pixel (bits-per-pixel). This value can be 0, as it is easily obtained from other data; for example, if the image is not stored in PNG format, then the number of bits per pixel is calculated based on information about the size of the raster, as well as its width and height. If the image is stored in PNG format, then the corresponding information is stored in the PNG itself. However, setting this field to 0 is not recommended, as the logic for choosing the best image is unknown in different versions of Windows.
  • B.CUR defines the vertical coordinate of the "hot spot" in pixels, relative to the top edge of the image.
size 8 4 Specifies the size of the raster in bytes
offset 12 4 Specifies the absolute bitmap offset in the file.

Notes

see also

Links


Wikimedia Foundation. 2010 .

See what "ICO (file format)" is in other dictionaries:

    ICO, Windows icon File extension: .ico Type Developer: Format type: raster graphics ICO (Windows icon) file format for storing icon files in Microsoft Windows. The ICO format is similar to the CUR (Windows cursors) format, designed for ... ... Wikipedia

    This term has other meanings, see RAW. RAW (English raw raw, raw) data format containing raw (or minimally processed) data, which avoids information loss, and does not have ... ... Wikipedia

    CorelDRAW file format Extension.cdr Developed by Corel Corporation Format type Vector graphics, bitmap graphics Open format? no ... Wikipedia

    This article or section has a list of sources or external links, but the sources of individual statements remain unclear due to the lack of footnotes ... Wikipedia

    Digital Representation for Communication of Product Definition Data (IGES) (pronounced: ijes) Digital Representation for Communication of Product Definition Data 2D/3D vector graphics format; used by many ... Wikipedia

    This article includes a description of the term "AIFF"; for the AIFF football federation, see All India Football Federation Audio Interchange File Format Extension .aiff .aif .aifc MIME audio/x aiff audio/aiff Developed by Apple Inc. Format type Audio file ... Wikipedia

    JPEG2000 Extension .jp2, .j2k, .jpf, .jpx, .jpm, .mj2 MIME image/jp2, image/jpx, image/jpm, video/mj2 Developed by Joint Photographic Experts Group Format type Graphic format Standard(s) ... Wikipedia

    Extension.fpx Bitmap Graphics Format Type Extended from IVUE FlashPix is ​​a file format for storing bitmap graphics that allows you to save an image at multiple resolutions in a single file. Despite the fact that in this case the file size is ... ... Wikipedia

    - (formerly also English Advanced Streaming Format, Active Streaming Format) a file format developed by Microsoft that contains streaming audio and video. ASF is part of Windows Media. The format is suitable for both local ... ... Wikipedia

    Extension .avi MIME video / avi, video / msvideo, video / x , msvideo Developed by Microsoft Format type media container Contains Audio, Video Audio Video Interleave (abbreviated as AVI; lit. "sequence ... Wikipedia

ICO, Windows icon
Extension .ico
MIME-type image/vnd.microsoft.icon
Developer Microsoft
Format type raster graphics

Format ICO similar to the format CUR(Windows cursors) for storing cursors. The difference lies in the numerical value of one field in the header structure and the interpretation of the values ​​of the other two fields of the same structure.

One ICO-file contains one icon. Icons can be of any size, but the most commonly used square icons are 16px, 32px, and 48px. Icons with sizes of 24, 40, 60, 72, 92, 108, 128 pixels are also used.

Starting with Windows 98/2000, the format supports embedding JPEG and PNG images, but icon data is typically stored uncompressed. [ ]

Icons come in natural color (True Color , 24-bit color depth), High Color (16-bit color depth), or fixed palette (256, 16, or just 2 colors). In this case, the number corresponding to each pixel indicates not the color, but the number of the color in the palette.

In terms of their structure, the images in the ICO file are closest to BMP, but fundamentally differ from them in the presence of an additional image - a mask superimposed on the background using the bitwise AND operation, which allows for (full) transparency of the picture. Subsequent XORing of the main image can even produce "inverted" pixels in places where the background has not been masked out.

In addition, starting with Windows XP, 32-bit icons are supported - each pixel corresponds to 24-bit color and an 8-bit alpha channel, allowing for 256 levels of partial transparency. Using the alpha channel, you can display icons with smooth (blurred) edges and a shadow that blends with any background; the mask is ignored in this case.

File format

The file consists of a fixed-length header, an image information directory, and the images themselves.

header

The header has a size of 6 bytes:

Image Information Catalog

Represents consecutive records of a fixed size (16 bytes) following one after another. The number of entries is determined by the header's count field.

Field Bias Size
(in bytes)
Description
width 0 1 Specifies the width of the image in pixels. Can take values ​​from 0 to 255 . If 0 is specified, then the image is 256 pixels wide.
height 1 1 Specifies the height of the image in pixels. Can take values ​​from 0 to 255 . If 0 is specified, then the image is 256 pixels high.
colors 2 1 Specifies the number of colors in the image's palette. Must be 0 for full color icons.
reserved 3 1 Reserved. Must be 0. Microsoft's technical documentation states that this value should always be 0, but icons that are generated by the .NET built-in tools (System.Drawing.Icon.Save) have a value of 255 in this field.
planes 4 2
  • B.ICO determines the number of planes. May be 0 or 1.
  • B.CUR defines the horizontal coordinate of the "hot spot" in pixels, relative to the left edge of the image.
bpp 6 2
  • B.ICO defines the number of bits per pixel (bits-per-pixel). This value can be 0, as it is easily obtained from other data; for example, if the image is not stored in the format

Similar posts