Subversion Repositories filter_foundry

Rev

Rev 184 | Rev 206 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 toby 1
/*
18 toby 2
    This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop
192 daniel-mar 3
    Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.com.au
4
    Copyright (C) 2018-2019 Daniel Marschall, ViaThinkSoft
2 toby 5
 
6
    This program is free software; you can redistribute it and/or modify
106 dmarschall 7
    it under the terms of the GNU General Public License as published by
2 toby 8
    the Free Software Foundation; either version 2 of the License, or
9
    (at your option) any later version.
10
 
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
    GNU General Public License for more details.
15
 
106 dmarschall 16
    You should have received a copy of the GNU General Public License
2 toby 17
    along with this program; if not, write to the Free Software
18
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
*/
20
 
21
/*
22
22-Feb-2003: started 0.1b1
23
23-Feb-2003: released 0.1b1,0.2b1
24
24-Feb-2003: 0.3b1,b2
25
25-Feb-2003: 0.3b3,b4
26
27-Feb-2003: 0.4b1 - with preview
27
01-Mar-2003: 0.4b4,5,6 - finally! live sliders
28
02-Mar-2003: 0.4b7,8,9,10
29
04-Mar-2003: 0.5b1 - first Windows beta released
30
08-Mar-2003: 0.5b4 - first Mac 68K build (CW1)
31
13-Mar-2003: 0.5b6 - finally caught divide-by-zero in Win version
32
15-Mar-2003: 0.5b7 - Mac version uses edit controls, theme, is movable
33
16-Mar-2003: 0.6b1,2 - zoomable preview
34
16-Mar-2003: 0.6b3 - Windows preview pannable
35
16-Mar-2003: 0.6b4 - fix map()
36
16-Mar-2003: 0.7b1 - read Mac PARM resources
37
18-Mar-2003: 0.7b2 - check for direct host callbacks before using them (preview)
38
23-Mar-2003: 0.8b1 - can now make standalone filters (Mac only)
39
26-Mar-2003: 0.8b3 - switch to "universal" PowerPC build in one file (inspired by Harald Heim)
40
28-Mar-2003: 0.8b4 - Windows version can load PARM resource
41
31-Mar-2003: 0.8b5 - Windows version can create standalone (?) NT platform only
42
16-May-2003: 0.9b1 - added cnv() function, dmin, mmin
43
17-May-2003: 0.9b2 - fix dmin/mmin crash
44
17-May-2003: 0.9b3 - add Harry's suggestions: skip comments; other bugfixes
45
19-May-2003: 0.9b4 - fix Make... suggested file name bug
46
21-Jul-2003: 0.9b5 - fix crash on About box (!!)
47
28-Jan-2004: 0.9b6 - fix problems with making standalone on Mac (thanks Chris Greene)
48
31-Jan-2004: 1.0b1 - finally fix Win32 standalone filters - building and running
49
06-Feb-2004: 1.0b2 - fix bufferSpace computation (Prepare call)
50
21-Feb-2004: 1.0f1 - GPL source release
51
20-Mar-2004: 1.0f2 - fix code to blank margins of preview... hunting David Owen's crash
52
21-Mar-2004: 1.0f3 - alert when pb->inData is NULL - temporary workaround for crash bug
53
23-May-2004: 1.0f4 - include missing license(!)
54
25-Sep-2004: 1.0f5 - remove debug calls in Win build (!!) - thanks Shiro Akaishi;
106 dmarschall 55
                                         fix RC EDITTEXT syntax
2 toby 56
20-Dec-2004: 1.0f6 - fix bug in rad(d,m,z) -- wasn't relative to centre of image!
57
                                         also ff_c2d, needed to negate x and y arguments to atan2()
58
02-Feb-2005: add Win VERSIONINFO
59
06-Feb-2005: 1.1a1 - scripting support
60
09-Feb-2005: 1.1b1 - incl aete for Windows
61
                         1.1b2 - oops, forgot scripting.r (aete resource) in 68K build
62
10-Feb-2005: 1.1b3 - various mostly cosmetic cleanups; switch to GNU flex and bison in Makefile
63
                                   - use monospaced font in Win expr text controls
64
                         1.1b4 - fix crash blooper in make.c (fixpipl)
65
11-Feb-2005: 1.1b5 - cosmetic fixes in Mac dialog (right justify slider text, etc)
21 toby 66
                         1.1b6 - fix aete key (hash) calculation for standalones to obey Adobe's stated rules
2 toby 67
                         1.1b7 - aaaargh fix stupid hex handling bug in lexer
68
                         1.1b8 - remove dbg call in lexer (it's late :( )
8 toby 69
24-Jun-2005: 1.1b9 - Mach-O build for CS2/Mac
11 toby 70
25-Jun-2005: 1.1b10 - can make 'standalone' Mach-O bundles
15 toby 71
22-Jul-2005: 1.1b11 - merge changes to fix parameter bug reported by Demitrios Vassaras
18 toby 72
03-Oct-2005: 1.1f1 - fix dialog behaviour on repeated filter application
21 toby 73
18-Jan-2006: 1.1f2 - fix CS2/Mac build (missing fields in PiPL);
74
                     scripting parameters were being ignored (!!)
24 toby 75
26-Feb-2006: 1.1f3 - fix plugin DLL extension; fix many source code warnings
32 toby 76
16-Mar-2006: 1.1f4,5 - add default extension AFS, 8BF for file saving (thanks Daniel Denk)
35 toby 77
17-Mar-2006: 1.1f6 - fix loading of Filter Factory saved PARM data on Windows
39 toby 78
18-Mar-2006: 1.1f7,8 - safer handling of previewing very large images, and clarify out-of-memory message
43 toby 79
21-Mar-2006: 1.1f9,10 - improve file filtering on OS X (parse Windows-style extension filter)
45 toby 80
22-Mar-2006: 1.2b1 - read parameters from Windows .8BF Filter Factory standalones, in Mac version
48 toby 81
23-Mar-2006: 1.2b2 - new release
50 toby 82
25-Mar-2006: 1.2b3 - include R,G,B,A,C,I,U,V undocumented(?) constants (per Harald Heim)
52 toby 83
06-May-2006: 1.2b4 - fix minor AFS saving bug
54 toby 84
05-Jun-2006: 1.3b1 - fix x,y,X,Y,M variables to use selection extent instead of image size (per Eiji Nishidai)
57 toby 85
01-Sep-2006: 1.3b2 - fix standalone UI bugs (thanks Craig Bickford)
64 toby 86
04-Jan-2007: 1.4b1 - Universal Binary on OS X (PPC+Intel)
66 toby 87
31-Jan-2007: 1.4b2 - fix selection bug reported by Daniel Denk
71 toby 88
01-Feb-2007: 1.4b3 - in cnv(), repeat pixels at edge of image, instead of using zero (reported by Daniel Denk)
89
             1.4b4 - cnv() no longer requests entire filtered image in one piece; can now work in chunks
90
                     improve the handling of edge pixels when filtering selection
76 toby 91
02-Feb-2007: 1.4b5 - minor changes to image sampling logic (ff_src(), rawsrc())
85 toby 92
16-Feb-2007: 1.4b6 - lowercase default file extensions (wishlist #1)
83 toby 93
18-Feb-2007: 1.4b7 - swap +/- zoom controls to match Photoshop builtins
87 toby 94
             1.4b8,9,10 - simple parameter obfuscation in standalone plugins (wishlist #7)
93 toby 95
19-Feb-2007: 1.5b1,2 - support remaining 8-bit image modes (wishlist proposal)
99 toby 96
13-Jul-2007: 1.5b3 - add instrumentation to try to find CS3/Intel Mac 'Make standalone' problem
101 toby 97
02-Aug-2007: 1.5b4 - fix debug message spotted by Daniel Denk
98
26-Aug-2007: 1.5b6 - associativity of ?: operator (Harald Heim)
102 toby 99
07-Jun-2009: 1.6b1 - clean up for 64-bit Windows build
175 dmarschall 100
20-Sep-2019: 1.7b1 - Fixed crash at filter startup when computer had too much RAM.
119 dmarschall 101
                   - Fixed crash where built obfuscated filters could not be opened.
102
                   - Added function rst(i) which is an undocumented function in Filter Factory for setting a random seed.
103
                   - Size PARM_SIZE in PARM ressource corrected.
172 dmarschall 104
                   - Added Visual Studio project file, and extended NMake script to support flex and bison compilation.
119 dmarschall 105
                   - Dialogs (build dialog, open and save dialogs) are now modal, i.e. the main window is locked when they are open. (*)
106
                   - The preview dialog has now a hand cursor. (Open hand on hover. Grabbing hand on panning) (*)
107
                   - Dialog boxes now have an [X] button to close the window.
108
                   - Preview: Checkerboard does only move when the panning actually suceeded (the picture didn't went off border)
109
                   - Bugfix: In the preview window, you could (virtually) pan the image beyond the canvas,
139 dmarschall 110
                             so that you needed to pan multiple times in the opposite direction to get to the position "0" again.
119 dmarschall 111
                   - The "version information" of standalone filters is now individualized by the creators input
126 dmarschall 112
                   - Win64 support (*)
119 dmarschall 113
                   - All undocumented symbol aliases of FilterFactory are now supported (rmin, rmax, cnv0, etc.)
121 dmarschall 114
                   - Bugfix: In some cases, the preview image had a small stripe of random pixels at the right or bottom.
122 dmarschall 115
                   - For disabled sliders, the corresponding label is now also grayed out (*)
116
                   - Bugfix: In standalone filters, the unused ctl() labels were not hidden. They are now invisible as intended.
123 dmarschall 117
                   - Bugfix: At standalone filters, the "map" text was not displayed; instead, the two "ctl" texts were displayed.
124 dmarschall 118
                   - AFS Files are now compatible with FilterFactory. (FilterFactory does ONLY understand "\r" (0D) linebreaks, while
119
                     FilterFoundry always saved "\n" (0A) linebreaks, while being able to read "\r", "\n" or "\r\n". Now, "\r" is used
120
                     for saving.) (*)
148 dmarschall 121
                   - The "caution" sign that indicates an error in the expression now has a hand cursor that shows up when
126 dmarschall 122
                     you hover over the icon, to indicate that the user will receive more information if they click on the icon (*)
151 dmarschall 123
                   - The "caution" sign now has a sharper design (it was a bit pixelated).
127 dmarschall 124
                   - The expression input fields now have a vertical scrollbar (*)
128 dmarschall 125
                   - YUV formulas are now more accurate. They are slightly different, but not much.
126
                     The i range is now [0..255] instead of [0..254]. (This means that pure white has now i=255 instead of i=254)
127
                     The u range stays at [-55..55].
128
                     The v range is now [-78..78] instead of [-77..77].
130 dmarschall 129
                   - Bugfix: If ctl() or map() was called with a non-constant argument, the controls in the build dialogs
130
                     were not correctly enabled/disabled, and built standalone filters did not get the correct
131
                     "needs UI" flag. Fixed.
132
                   - In the build dialog, if map() was used, the corresponding ctl()-labels now can't be changed anymore,
133
                     since the resulting standalone filter won't show them anyway.
131 dmarschall 134
                   - Warning windows (alertuser and simplealert function) are now modal. (*)
134 dmarschall 135
                   - Bugfix: Trigonometry functions sin and cos had wrong output ranges for Windows (it was -1024..1024 instead of
136
                     the documented output range -512..512). Fixed.
138 dmarschall 137
                   - Bugfix: Trigonometry function tan now behaves like in Filter Factory
139 dmarschall 138
                   - Bugfix: Function c2d() now behaves like in Filter Factory. Implementation changed from atan2(-y,-x) to atan2(y,x).
142 dmarschall 139
                   - Bugfix: The cell values used by the functions get() and put() were not (re-)initialized before the filter started running.
140
                     This caused that expressions like "put(get(0)+1,0)" produced different results at each run.
147 dmarschall 141
                   - Adobe Premiere FilterFactory/TransitionFactory filters (.pff Settings and .prm 16/32 bit Windows Standalone Filters) can now be imported (*)
152 dmarschall 142
                   - Old FilterFactory standalone filters for MacOS can now be imported (*)
153 dmarschall 143
                   - In Windows, the "load" algorithm will now first check if a file is an AFS/PFF file, and then if it is a standalone filter.
144
                     Due to this, files can now opened, even if they have the wrong file extension.
150 dmarschall 145
                   - Bugfix: When state changing functions (rst, rnd or put) are used within the formula,
146
                     every pixel in the picture will now be evaluated during preview, even if the user
147
                     has zoomed in.
155 dmarschall 148
                   - Fixed "off by one" bug where you could pan a fit-zoomed picture by 1 pixel in the preview
158 dmarschall 149
                   - The preview area now has a dark off-canvas area and for Windows, a "sunken" border
150
                   - Windows: Visual Styles are now supported and always be applied
151
                   - Bugfix: If you click the zoomlevel-caption for a tiny picture, the zoom ("fit zoom") won't zoom in to >100% anymore.
162 dmarschall 152
                   - Building of standalone filters is now possible with Windows 9x
153
                     (requires compilation using an old Windows SDK, or compilation using OpenWatcom)
164 dmarschall 154
                   - Fixed TLV lengths in the PIPL structure (includes now paddings).
155
                     This might solve incompatibilities with non-Photoshop hosts (i.e. GIMP).
183 dmarschall 156
                   - GIMP (using PSPI to load 8BF plugins) and IrfanView is now compatible.
170 dmarschall 157
                   - c2m() and sqr() are now approximately 3 times faster
175 dmarschall 158
                   - Build of plugins with empty title or category will now be prevented,
159
                     since plugins with empty category or title won't be shown in the filter menu.
178 dmarschall 160
                   - Fixed Actions (recording/playback). Several things like the AETE resource were broken.
161
                     The classID had to be changed to 'Fltr' so that the parameters are shown in the
162
                     Photoshop Action tab. (*)
184 dmarschall 163
                   - Scripting/Actions: For standalone filters, the name of the sliders
164
                     are now written in the 'Actions' tab. The function 'fixaete' was replaced with 'aete_generate'. (*)
181 dmarschall 165
                   - "MaxSpace64" will now be used, if supported by the host
126 dmarschall 166
                   (Changes by Daniel Marschall)
106 dmarschall 167
 
168
(*) This bug/solution was tested on Windows but needs to be verified and/or implemented on Mac.
169
 
2 toby 170
*/
171
 
172
#define plugInName "FilterFoundry"
129 dmarschall 173
#define VERSION_STR "1.7b1"
174
#define VERSION_NUM 1,0x70,beta,1
2 toby 175
#define VERS_RSRC VERSION_NUM,verAustralia,VERSION_STR,"Filter Foundry " VERSION_STR
176
 
153 dmarschall 177
#define RELEASE_YEAR "2019"
178
 
2 toby 179
/* formatted for Win32 VERSIONINFO resource */
129 dmarschall 180
#define VI_VERS_NUM 1,7,0,1
45 toby 181
#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 */
182
#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 */
2 toby 183
 
184
/* wildcard signature in resources */
185
#define ANY '    '