/* This file is part of icoformat, a Windows Icon (ICO) File Format plugin for Adobe Photoshop Copyright (C) 2002-2010 Toby Thain, toby@telegraphics.com.au This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* 25-Dec-2002: ICO reading 26-Dec-2002: v1.0b1 released 27-Dec-2002: v1.1b1 - transparency handling on write RGB 27-Dec-2002: v1.1b2 - enable transparency handling for read RGB 01-Jan-2003: v1.1b4 - Windows, 68K release 02-Jan-2003: v1.1final - GPL source release 06-Jan-2003: v1.1.1 - disable "compact colour table" option 10-Jan-2003: v1.1.1r2 - mainly cosmetic edits to source; change archive format to .sit 12-Jan-2003: v1.2 - per Chris (kmkkid), read/write alpha channel 05-Feb-2003: v1.2b3 - relax checking of idType (per DJ Victor Moraes test file Graphite.ico) 26-Feb-2003: v1.3b1 - derive 1-bit AND mask from alpha channel, if no explicit transparency channel present (inspired by Adrian Colgate) 27-Feb-2003: v1.3b2 - ensure image (XOR) data is black, where 32-bit alpha is 100% transparent and no mask channel is provided (Adrian Colgate) 03-Mar-2003: v1.3 final - fix Win32 window centring 05-Apr-2003: v1.3f3 - one-file "universal" PowerPC build 22-Aug-2003: v1.4 - on write, use Indexed transparent index to build AND mask (per Brian Sexton) 23-Aug-2003: v1.4b2 - public release 24-Aug-2003: v1.4b3,4 - bugfixes in alpha/mask handling 11-Oct-2003: v1.4 final - label as final, add ".txt" to README file name 20-Oct-2003: v1.5b1 - per stuart@delta2.net, ensure XOR data is ZERO for transparent pixels (all depths) 07-Nov-2003: v1.5b2 - popup menu for icon selection 08-Nov-2003: v1.5b3 - remove (ahem) debugging calls 09-Nov-2003: v1.6b1,2 - fix transparency properly: ZERO transparent palette entry 0,0,0 - not its index! 31-Jan-2004: v1.6f1 - change unit conversions (resolution) to avoid overflow 04-Dec-2004: v1.6f2 - improve README; change text description to "ICO (Windows Icon)" 03-Jan-2005: v1.6f3 - tweaks for 68K (PiMI) version, as tested with Photoshop 2.5; fix bitmap black handling 08-Jan-2005: sent to Mike Russell for his kind assistance. 02-Feb-2005: add Win VERSIONINFO 24-Jun-2005: v1.6f5 - Mach-O build for CS2/Mac 14-Nov-2005: v1.6f6 - update README, convert to HTML 15-Nov-2005: v1.6f7 - fix typo; add stylesheet to README 18-Jan-2006: v1.6f8 - adjust About box layout (Mac) 24-Mar-2006: v1.7b1 - support Vista (PNG) format icons (thanks Brian Hunger for suggestion) 26-Mar-2006: v1.7b2,3 - minor changes 27-Mar-2006: v1.7b4 - fix saving of 2-channel Indexed to PNG (throw away 2nd channel for now) 19-Jun-2006: v1.7b5 - change computation of AND mask for 32-bit images to reflect complete transparency only 04-Jan-2007: v1.8b1 - Universal Binary on OS X (PPC+Intel) 17-Jan-2007: v1.8b2 - rev libpng to 1.2.15; add 'dmg' target for distributing the OS X plugin bundle 23-Jan-2007: - sent to Anton Borzov, who was first to complain that older versions don't run on Intel Macs (CS3) 23-Apr-2007: v1.8b3 - increase memory slop, to see if this helps some Vista users seeing error messages 11-May-2007: v1.8b4 - read CUR too (see http://www.adobeforums.com/cgi-bin/webx?addBookmark@@.3bc3dde0/4) 24-Jun-2007: v1.8f1 - remove confusing "cs2" labelling from Mach-O builds 10-Jul-2007: v1.8f2 - fix broken Universal dmg 04-Sep-2007: v1.8f3 - update README only (Vista notes) 24-Oct-2007: v1.8f4 - new Win32 build with updated MinGW; binutils-2.17.50-20060824-1, gcc-3.4.5-20060117-1 01-Nov-2008: v1.8f5 - new Win32 build with Visual C++ 2008 Express Edition 17-Dec-2008: v1.9b1 - prepare for 64-bit build (suggested by Jameel Al-Aziz) 16-Feb-2009: v1.91b1 - sniff for renamed BMP, GIF and JPEG files (inspired by Jennifer Getz who found a renamed GIF) 23-May-2009: v1.92b1 - 64-bit portability fixes 24-May-2009: v1.92b2 - more cleanup 04-Jun-2009: v1.93b1 - fix crashing bug if first entry was formatSelectorAbout 24-Feb-2010: v1.94b1 - compute the biSizeImage field as required by software used by James Perry 27-Feb-2010: v1.94b2 - minor cleanup 20-Apr-2010: v2.0b1 - CS5 port with ADM UI 27-Apr-2010: - beta released 28-Apr-2010: v2.0b2 - various cleanup 01-Aug-2010: v2.0b4 - revert to C for Mac OS X builds */ #define VERSION_STR "2.0b4" #define VERSION_NUM 2,0x00,beta,4 #define VERS_RSRC VERSION_NUM,verAustralia,VERSION_STR,"ICO (Windows Icon) Format " VERSION_STR /* formatted for Win32 VERSIONINFO resource */ /* development = 0x20, alpha = 0x40, beta = 0x60, final = 0x80 */ #define VI_VERS_NUM 2,0,0x60,4 #define VI_FLAGS 0 /* 0 for final, or any of VS_FF_DEBUG,VS_FF_PATCHED,VS_FF_PRERELEASE,VS_FF_PRIVATEBUILD,VS_FF_SPECIALBUILD */ #define VI_COMMENTS "Beta.\r\n\r\nPlease contact support@telegraphics.com.au with any bug reports, suggestions or comments.\0" /* null terminated Comments field */ /* wildcard signature in resources */ #define ANY ' '