
Filter Definition File
Filters are defined and configured in the filter definition file filters in the easycopy/system directory. Each line defines one filter by means of three fields:
| "detection" "command-line" "description" |
Some file formats do not have a simple "magic word". They have certain other characteristics, and EasyCopy is prepared to detect these. Filter definition lines for these formats contain a reserved word in place of the "magic word".
![]() | Strictly, the "reserved word" is first assumed to be the name of an executable program that can do a safer file detection. If a program of that name cannot be found on the path it is assumed to have the fixed meaning as described below. However, this feature is not currently used by any of the filters distributed with EasyCopy. |
The following reserved words are known:
| *xzASCII | Plain ASCII text file |
| *xzPOSTSCRIPT | PostScript files |
| *xzPDF | Portable Document Format |
| *xzCalcomp | CalComp plot files |
| *xzCGM | Computer graphics metafiles |
| *xzHPGL | HP-GL files |
| *xzGRAPHICS | Any of the three vector formats listed above |
| %R | Printer resolution (in dpi) |
| %W | Maximum page width (in points) |
| %H | Maximum page height (in points) |
The third field is a short text string that is displayed next to the preview image in the Open dialog. If this string is terminated with ".\n" (period, newline) this will terminate the displayed text. Otherwise a new type (originating from the interpretation of the converted file) is appended. Include ".\n" if you want the description to be final. Terminate with a blank if the next type should also be displayed (for example "gzipped ").
Example: (Windows)
If you have a program that converts Adobe Photoshop images to Portable Pixel Map you can install it as a filter by putting this line in the filters file:
| "8BPS" "C:\\Program Files\\My Filters\\pds2ppm.exe" "Photoshop image.\n" |
![]() | The above is only an illustrative example. AGI has no knowledge about the availability of any pds2ppm program. |