D2007 (December 2007 update) BRCC32, ICO, RES and color depth problem / refinement

After a much larger investigation, which I would like, I came to the conclusion (possibly erroneously) that BRCC32 has a problem creating resource files that have ICO images with different color depths.

To be specific, if you have icons in the ICO file that have both 8-bit 256-color and 24-bit images (alpha), then BRCC32 will create a RES file containing them, but as 8-bit, so and 24-bit images will be marked as 24 bits. The problem is that systems that want to display 24-bit images, that is, those that can have more than 256 colors, will select the first image that meets this requirement. In my case, at least it will be a โ€œpseudoโ€ 24-bit color icon 256. Thus, you get an icon with a lower resolution on the desktop than you should do.

Using the HeavenTools 'Resource Tuner', you can see that the โ€œGroup Iconโ€ information may contain 24-bit descriptors for 8-bit images.

Two ways for me. Delete 256-color ico images, which results in only the โ€œcorrectโ€ 24-bit Alpha XP images appearing in the resulting RES file. The disadvantage is that you do not have 256 color icons if you need them. It is best to use GoRC.exe (resource compiler) from http://www.godevtool.com/#rc as an alternative to BRCC32. This handles the combination of 8 and 24 bit images correctly. As a result, windows can select the correct icon corresponding to the system screen resolution.

As a side issue, I also saw that BRCC32 does not seem to handle PNG compressed images (you get 15 Allocate failed error). He was looking for this error that I encountered with GoRC (via Jan Wichers blog).

Does anyone have similar experience confirming my findings, or am I lacking some key knowledge? My follow would be, is this still a problem in the D2009 / D2010 ??

Paul.

+4
source share
1 answer

I recently had the same problem - the BRCC32 resource compiler is definitely confused if you have 256-color and 32-bit color sub-icons in the same icon. After a lot of research, it seems that when the title of a group of icons is written to a .res file, it always puts a 32-bit value, ignoring the actual color depth.

I had to create an application to allow this, and I added it below using the source. Considering this quick fix I made that makes some assumptions about what will be found in the resource file, I thought this might help you:

Resfix.zip

+1
source

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


All Articles