News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Rc.exe Icons

Started by ragdog, January 08, 2016, 05:37:46 AM

Previous topic - Next topic

ragdog

Hello

Long time use i Icons in my Application now im wonder me Hehe
I use a Icon 128*128 an the resource compiler blowing the exe up.



Writing ICON:1, lang:0x409, size 67624
Writing ICON:2, lang:0x409, size 9640
Writing ICON:3, lang:0x409, size 4264
Writing ICON:4, lang:0x409, size 2216
Writing ICON:5, lang:0x409, size 1128
Writing ICON:6, lang:0x409, size 1384
Writing GROUP_ICON:100, lang:0x409, size 90


I have read the icons have a Bitmap compression Gives any tool to change Png compression?
Or a way to use Png Icons?

Regards,

fearless

Depends on how they will be used. If its for the icon on the main window of your app and the main exe icon probably best just use the standard ico as you have been doing. If its for something else then its possible to use png instead of it. But again depends on how its to be used. Png is maybe more useful as a replacement for a bitmap in your program. You can store pngs as RCDATA in your resource file and use pnglib to decode and covert to a bitmap in memory to use: http://www.madwizard.org/programming/projects/pnglib

So depends on what your replacing and it might be easier to just use the standard icons as is, and accept the file size will grow with the inclusion of resources: icons, bitmaps etc etc.

ragdog

Yes this is clear

Bit i have a standart ico for my exe (Explorers view)


I Have use a Commercial (Trial Version) IcoFx to extract the 32*32 icon and Compress in Png format.
But my question is i use a Icon 128*128 and include it im my resource after Building my exe
Is in my resource 6 icons

 

Now i big project with many icons blowing the exe up.

Gives not a solution to use a single Icon not icon group?


dedndave


ragdog

Thanks Dave

But your Ico is 401kb and it include deminsion

256 × 256 (16.8mil colors)
128 × 128 (16.8mil colors)
96 × 96 (16.8mil colors)
64 × 64 (16.8mil colors)
48 × 48 (16.8mil colors)
32 × 32 (16.8mil colors)
24 × 24 (16.8mil colors)
16 × 16 (16.8mil colors)

I have Edit your ico and now have i only a 32*32 ico size 4,18kb
So there are the other icons is wasted space ?

16*16
24*24
48*48
64*64
96*96
..
.

And all icons use bitmap compression but a Png compression ist better or not?

dedndave

the additional formats are for test and demo purposes

PNG compression is smaller - but not supported until Vista or Win7 (i forget which version)

dedndave

what you probably want to do is reduce the number of colors
256-color icons can be very nice looking, if you select the colors carefully   :t

fearless

Id read something yesterday that said vista onwards did support png in the icons.

Ive a project that also has a lot of icons and resource. > 256 (which led me to adding in upto 512 to the radasm v2.2.2.2 to help support that)

Anyhow, as the icons in my project are only used in a listview in report style, they are only 16x16. Same with toolbar, it is using 16x16 icons. Only my menus images are using 24x24 bmps. And the main exe ico is the only one with multiple icon sizes (128x128, 96x96, 64x64 down to 16x16), which is just for viewing it in explorer or on desktop.

So id recommend only adding the icon sizes you will need. If you have an explorer style view and you know it will also be displaying list and report styles, then you can add in an icon which has multiple sizes - but you can choose what sizes it has, so you might be able to get away with icons that have 48x48 and 16x16 for example, or 32x32 and 16x16, you dont have to add in all the various sizes - unless you have a particular need to do so.

dedndave

can you show us the largest icon ?
are you making buttons, or are these other types of icons ?

when i make buttons, i use an image strip   :biggrin:

EDIT: by the way, this image has a nice 256-color palette for icons

ragdog

Thanks you both

This is only why i wonder me the exe size blowing up, but i have understand it.


Quoteimage strip
yes I use it for a long time  :t