How to check windows icon file for image quality

I recently used an icon file obtained from our marketing team. The icon file when opened in the resource editor (Visual Studio 2008) is as follows.

enter image description here

The same file, when opened and saved in IcoFX, is correctly displayed in the resource editor. enter image description here

My marketing team uses some tools ( Picture2Icon ) on a Mac and creates an icon file that seems corrupted or not completely correct. The same file saved by IcoFx seems to be correct. What causes ICOFX abnormality?

As a result, exe shows bad icons. The exact case when the image is bad is unclear - it is reported if the color quality is set to "medium" (Windows XP) . This is worse when the executable is β€œselected” in Windows Explorer.

enter image description here

Here is one icon that shows the problem: https://github.com/jayanmn/icontest/blob/master/icontest.ico

A complete sample code for creating exe is at https://github.com/jayanmn/icontest/

So, is the ico file set, how can I make sure it works fine on WindowsXP, Windows Vista and Windows7?

+6
source share
1 answer

I looked at your icontest.ico file provided from the GitHub website well and found that the solution is a simple solution.

First, let me illustrate the problem, as I see it on a 32-bit Windows XP system using the free IrfanView , which is a great image viewer for this task.

Here is a composite snapshot I made illustrating an error for 5 of 6 layers , as shown with IrfanView:

enter image description here


To fix the above icontest.ico file, you might think that frames 1,2,3,4 and 6 are bad. But the opposite is true! It turns out that frame 5 is the culprit !.

In particular, frame 5 has compression set in this frame, which causes a problem.

The actual fix that is required is simply to save the icontest.ico file without compressing this layer. For this purpose, the free GIMP application, which is an excellent image editor. for this task.

Just save the icon file using GIMP , but remove the compression for layer 5th , as shown below:

enter image description here


The end result is icontestResaved.ico correctly displayed, as shown in IrfanView (Tip: to view the frames of the icon file in IrfanView, use the Red arrows next to the frame number, i.e. 1/6): enter image description here

The best way to make sure that the file works on different Windows operating systems is to actually have an available machine, because the rendering mechanism is unique and emulators may not work as intended.

For the curious: Setting all the layers that need to be compressed in GIMP has led to the icon in Windows Explorer not being visible .

Tip. . To view the referenced images above in their original size , right-click and select View Image.

Status update: Consider installing Axialis IconWorkshop β„’ Lite Version 6.3.1.1 to handle all of your icon development work tasks. This is the free Visual Studio 2008 module provided by Axialis themselves!

+4
source

Source: https://habr.com/ru/post/918147/


All Articles