[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - How to create 256x256 32-bit PNG icons for Windows?

How to create 256x256 32-bit PNG icons for Windows?

Discuss programming topics for any language, any source base. If it is programming related but doesn't fit in one of the below categories, it goes here.

Moderator: InsideQC Admins

How to create 256x256 32-bit PNG icons for Windows?

Postby Knightmare » Mon Jul 20, 2015 4:45 pm

I've examined the .ico files that some newer games use, and the largest image is usually a 256x256 32-bit PNG image. It's not made from a PNG image, it's an actual PNG inside the .ico file.

I've tried making my own icon in this format by pasting a 256x256 image into the icon editor in Visual Studio 2008, and it always ends up as BMP format, making the icon itself over 200KB!

I've also tried overwriting the images in these icons, and found that VS2008 won't let you paste over the PNG variant.

Does anybody know what editor was used to create icons with this internal format? I've created a nice 256x256 icon for KMQ2, but I don't want to bloat the .exe size by 200KB.
Knightmare
 
Posts: 63
Joined: Thu Feb 09, 2012 1:55 am

Re: How to create 256x256 32-bit PNG icons for Windows?

Postby mh » Mon Jul 20, 2015 7:34 pm

I don't know what program Microsoft themselves use, but I do know that IcoFX is capable of making this kind of icon, and when subsequently opened in the Visual Studio resource editor correctly shows that the 256x256 icon is in PNG format.

IcoFX used to be freeware but recent versions are commercial. You should still be able to find the free version on the usual download sites.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: How to create 256x256 32-bit PNG icons for Windows?

Postby mh » Mon Jul 20, 2015 7:43 pm

...and here's Microsoft's own icon-making workflow from the XP days: https://msdn.microsoft.com/en-us/library/ms997636.aspx

Of course the icons described here max out at 48x48, but it still does handle the 32-bit with 8-bit alpha case and is probably similar enough to the current workflow.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: How to create 256x256 32-bit PNG icons for Windows?

Postby Spike » Mon Jul 20, 2015 8:52 pm

when in doubt, write your own...

https://en.wikipedia.org/wiki/ICO_%28file_format%29
should just be a couple of simple headers.
grab a hex editor, insert 22 bytes infront of your png, and edit them accordingly.

then open it up with msvc and add in your extra 32*32/16*16 images for winxp/earlier.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: How to create 256x256 32-bit PNG icons for Windows?

Postby Johnny Law » Thu Jul 23, 2015 9:54 pm

A quick test with GIMP on my Mac:

- Created a 256x256 image in RGB color format.
- Chose to export as a Windows Icon (.ico) file.
- The export dialog gives me color depth/palette options as well as a checkbox for PNG compression.

That might be what you want? My test output file (which should be 24-bit PNG in the icon) is at https://dl.dropboxusercontent.com/u/116 ... p/test.ico
User avatar
Johnny Law
 
Posts: 22
Joined: Mon Apr 28, 2014 8:34 pm
Location: San Carlos, CA

Re: How to create 256x256 32-bit PNG icons for Windows?

Postby Johnny Law » Thu Jul 23, 2015 9:57 pm

Or I guess specifically you were looking for 32-bit, so I also tried that: https://dl.dropboxusercontent.com/u/116 ... /test2.ico
User avatar
Johnny Law
 
Posts: 22
Joined: Mon Apr 28, 2014 8:34 pm
Location: San Carlos, CA

Re: How to create 256x256 32-bit PNG icons for Windows?

Postby revelator » Thu Jul 23, 2015 11:45 pm

xnview which is free can also make 32 bit icons :)
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: How to create 256x256 32-bit PNG icons for Windows?

Postby Knightmare » Tue Aug 25, 2015 1:58 am

I finally got it working right with the free version of IcoFx. Thanks to everyone who replied.

My first few attempts resulted in smaller versions of the icon (48x48 and 64x64) with an alpha channel which I didn't want. When I tried editing it in Visual Studio to fix it, Windows would no longer display the 256x256 version of the icon. This was complicated by the icon caching in Windows 7, which will always display the same image for a given icon file, even after you've edited it, unless you rename or copy it somewhere else or reboot. I miss the days of forcing an icon cache rebuild with TweakUI.

I gave up for a while, but then came back and tried importing (in IcoFx) smaller versions of the image with the alpha channel removed, and everything ended up working correctly.
Knightmare
 
Posts: 63
Joined: Thu Feb 09, 2012 1:55 am


Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest