/* This file is part of PSPFormat, a File Format plugin for Adobe Photoshop Copyright (C) 2003-2011 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 */ /* 07-Apr-2003: commenced 10-Apr-2003: success with v5 RGB images 21-May-2003: released 0.1b1 22-May-2003: 0.1b3 - rowbytes now padded to whole bytes (not 4); skip "unknown" data in Channel Info chunk 24-May-2003: 0.1b4 - rowbytes special cased for <8 bit images - modulo 4 bytes 26-May-2003: 0.1b5 - better handling of "expansion" reserved data 28-May-2003: 0.1b6,7 - further cleanup of block/chunk handling 29-May-2003: 0.1b8 - fix problem handling uncompressed data 01-Jun-2003: 0.2b1 - support layer transparency and alpha channels 03-Jun-2003: 0.3b1 - user can choose layer 08-Jun-2003: 0.3b2 - fixed bug involving RLE & 4-bit images; 68K port 09-Jun-2003: 0.3b3 - add .TUB extension 11-Jun-2003: 0.3b4 - first source release 12-Jun-2003: 0.3b4b - added copyright notice for PSP file spec 20-Jun-2003: 0.3b5 - fixed nasty odd-image-width bug in 4->8 bit expansion 22-Jun-2003: 0.4b1,2 - add write 23-Jun-2003: 0.4b3 - write RLE & LZ77, also fix RLE bugs (overflow decompressed data was being thrown away) 04-Jul-2003: 0.4b4 - release 68K build 07-Jul-2003: 0.4b5 - add LZ77 compression for saving (RLE still not readable in PSP) 12-Jul-2003: 0.4b6 - write layer transparency, alpha channels 13-Jul-2003: 1.0b1 - AT LAST! writes RLE that doesn't crash PSP (runs must end at end of row! who knew?) 1.0b2 - fix PiPL on Windows to allow up to 16 channels 17-Jul-2003: 1.0b3 - fix miscalculation in Alpha Bank block length fixup for uncompressed images 08-Nov-2003: 1.0f1 - minor change to ignore metachars in Mac popup menu items 02-Feb-2005: add Win VERSIONINFO 14-Feb-2005: 1.0f2 - add PSP9 extensions (.pspimage, .pspframe, .pspshape, .psptube) or at least, adding 4-char abbreviations of these seems to help Photoshop 7 recognise them 13-Mar-2005: 1.1b1 - upgrade zlib to 1.2.2; ignore format errors if we can read at least one layer (helps recover corrupt files); switch to Photoshop's memory calls to fix crash on Carbon 22-Mar-2005: 1.1b2 - revert to stdlib malloc/free to fix baffling crash 23-Mar-2005: 1.1b3 - fix Prepare maxData calculation; back to Photoshop's memory calls, since we can't predict usage also use zlib allocator hooks to use Photoshop's allocator 25-Jun-2005: 1.1b4 - Mach-O build (CS2/Mac) 01-Sep-2005: 1.1b5 - Keely Bostick sent PSP files with raster layers with 0 bitmaps & 0 channels (?!) change BAD() to bring up alert in cases like this instead of crashing 01-Oct-2005: 1.2b1 - skip corrupt channels more reliably; increase maximum channels to 64 16-Apr-2006: 1.2f1 - upgrade zlib to 1.2.3 21-Aug-2006: 1.2f2 - fix handling of revertInfo (retaining PSP version & compression type for re-save) 22-Jul-2007: 1.3b1 - support Mach-O (PPC+Intel) build 08-Jun-2009: 1.4b1 - 64-bit Windows build 30-May-2010: 1.5b1 - port to CS5/Mac 03-May-2011: 1.5b2,3 - fix Win64 build */ #define VERSION_STR "1.5b3" #define VERSION_NUM 1,0x50,beta,3 #define VERS_RSRC VERSION_NUM,verAustralia,VERSION_STR,"Paint Shop Pro Format " VERSION_STR \ " Copyright (C) 2003-2011 Telegraphics http://www.telegraphics.com.au/sw/" /* formatted for Win32 VERSIONINFO resource */ /* developStage 0x20 alphaStage 0x40 betaStage 0x60 finalStage 0x80 */ #define VI_VERS_NUM 1,5,0x60,3 #define VI_FLAGS VS_FF_PRERELEASE /* 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 ' '