![]() |
Creating Alpha Icons |
Post Reply ![]() |
Author | |
Ark42 ![]() Senior Member ![]() ![]() Joined: 20 October 2003 Status: Offline Points: 291 |
![]() ![]() ![]() ![]() ![]() Posted: 17 June 2004 at 5:22pm |
I had a problem with not much software supporting creating 32bpp images, and the programs I did have only supported PNG/TGA/TIF, not BMP or ICO, and even then it can be a pain to work with 32bpp images somtimes. So here is a little command line utility I whipped up that can convert, split, and join 8/24/32bpp images in PNG/TGA/TIF/BMP/ICO formats: http://ark42.com/freeimage/alphahlp.exe C:\>alphahlp Usage: To convert from one format to another: alphahlp -f(ext) -c(ext) from_filename to_filename To split a 32bpp image into a 24bpp image and an 8bpp image: alphahlp -f(ext) -s 32bpp_filename 24bpp_filename 8bpp_filename To join a 24bpp image and an 8bpp image to form a 32bpp image: alphahlp -f(ext) -j 24bpp_filename 8bpp_filename 32bpp_filename ext must be one of png, tga, tif, bmp, or ico |
|
![]() |
|
Ark42 ![]() Senior Member ![]() ![]() Joined: 20 October 2003 Status: Offline Points: 291 |
![]() ![]() ![]() ![]() ![]() |
One suggestion for the Codejock library I would like to see is that currently I use: XTPImageManager()->SetMaskColor(RGB(0, 0, 0)); XTPImageManager()->SetIcons(bmAlphaIcons, nIDMenuBarIcon s, _countof(nIDMenuBarIcons), CSize(16, 16), xtpImageNormal, XTPImageManager()->IsAlphaIconsSupported()); Instead of SetMaskColor how about SetAlphaThreshhold so that you can, say, use all of the pixels that have an alpha value >=128 instead? |
|
![]() |
|
Ark42 ![]() Senior Member ![]() ![]() Joined: 20 October 2003 Status: Offline Points: 291 |
![]() ![]() ![]() ![]() ![]() |
I needed more features still, to deal with multiple formats in a .ico file as well as to automate tiled images where you have lots of little images all in one big file, so here is v2.0... AlphaHlp v2.0 Usage: To convert from one format to another: alphahlp -f(ext) -c(ext) from_filename to_filename To split a 32bpp image into a 24bpp image and an 8bpp image: alphahlp -f(ext) -s 32bpp_filename 24bpp_filename 8bpp_filename To join a 24bpp image and an 8bpp image to form a 32bpp image: alphahlp -f(ext) -j 24bpp_filename 8bpp_filename 32bpp_filename To split a multipage image into one singlepage file per page: alphahlp -f(ext) -m multipage_filename file_prefix file_suffix To append a singlepage image to a multipage image: alphahlp -f(ext) -a multipage_filename singlepage_filename To split a tiled image into one smaller image per tile: alphahlp -f(ext) -t -w# -h# tiled_filename file_prefix file_suffix To insert a single tile into a tiled image: alphahlp -f(ext) -i -w# -h# -c# tiled_filename singletile_filename More details: alphahlp -? |
|
![]() |
|
Kappy ![]() Newbie ![]() Joined: 08 April 2004 Location: Canada Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
Thanks for the utility, Ark! It is exactly what I need. It is strangely bizzarre how nothing supportes 32-bit bmps. Now the XTPro seems to have the alpha issues sorted out (v9.10) I am going to try and use them in a new product.
|
|
![]() |
|
Ark42 ![]() Senior Member ![]() ![]() Joined: 20 October 2003 Status: Offline Points: 291 |
![]() ![]() ![]() ![]() ![]() |
Glad somebody liked it :) Make sure you have v2.2 - I think I posted it to my site, but maybe not. It fixes a couple minor bugs, I think TGA files were messed up for one thing. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |