Image creation/mangling language https://rawtext.club/~sloum/filtress.html
Go to file
sloumdrone 4c5537c0e0 Adds a better readme and changes project folder structure for examples 2019-07-20 19:42:00 -07:00
example_filters Adds a better readme and changes project folder structure for examples 2019-07-20 19:42:00 -07:00
parser Fixes and simplifies pixel sampling. Removes put command, fixes LOX and LOY 2019-07-20 09:21:45 -07:00
.DS_Store Adds sublooping, better tree structure, extra register, more variables 2019-07-19 14:30:20 -07:00
.gitignore Its alivegit status 2019-07-18 16:49:04 -07:00
LICENSE Initial commit 2019-07-15 00:28:24 -04:00
README.md Adds a better readme and changes project folder structure for examples 2019-07-20 19:42:00 -07:00
filtress_notes.txt Adds receivers to filter and point structs 2019-07-17 16:18:58 -07:00
imageHandler.go Adds sublooping, better tree structure, extra register, more variables 2019-07-19 14:30:20 -07:00
main.go Adds a better readme and changes project folder structure for examples 2019-07-20 19:42:00 -07:00
receivers.go Fixes and simplifies pixel sampling. Removes put command, fixes LOX and LOY 2019-07-20 09:21:45 -07:00

README.md

filtress

Filtress is an interpreter for the filtress domain-specific-language. The interpreter reads an input file (filetype frs) and processes the commands to filter/modify an input image. Due to the fact that each frs file is essentially a custom image filter, shell scripts can filter many images with the same frs file in one go. In addition to color filtering, color overlays, and image sampling are also possible.

The language

The filtress language is pretty basic as far as languages go. All filtress filters/scripts should be contained in a file with the suffix frs (ex. myFilter.frs)

All elements in a filtress script are either a procedure, a variable, an opperator, or an opperand. Opperands are always positive integer values and variables always represent positive integer values as well. The following opperators are available: +, -, *, /, %, =. If an opperator is not passed to a procedure before an opperand then = is assumed. As such, you never have to use =, just know that that is what filtress is doing in those cases. All opperands can be passed as variables rather than as integers directly, with the exception of loops. Loops are started with the keyword (procedure) BEG followed by a number, like so: BEG 20. Anything that comes on the following lines is a part of the loop until the keyword END. At present, due to the way loops are handled by the parser, this number cannot be filled in by a variable. Many procedures represent a data value and as such can also be used as a variable. For example: RED +100 increases the value of RED by 100. If instead a person wanted to double red they could do RED *100 or RED +RED. Multivalue procedures such as COL and LOC cannot be used as variables, nor can things that do not represent a specific value, such as APY or BEG. Similarly there are two values that cannot be used as procedures, only as variables: WID and HIG.

Aside from the above, there are a few things to know. Comments are begun with the # symbol and go until end of line. These will be ignored by the parser. Each statement, consisting of a procedure and, optionally in some cases, an expression and or comment, must be on its own line.

For a more detailed overview of each prcedure and variable please visit the filtress manual. Another good resource to check out is the examplei_filters folder of this repo.

Intallation, Building, Dependencies

Building filtress from source requires the Go compiler. No dependencies beyond the go standard library are required.

License

This software.source-code is released under the Non-Profit Open Software License 3.0. The basic gist is that you are free to view, modify, and distribute the source code and use the program to your liking, so long as you do not make money doing so and release any modifications under the same terms. There are more details in the LICENSE file that accompanies this repository. The license does not cover frs files created by users or the images created with the software.

Filtress was initially inspired by interval.rs, but filtering images rather than creating audio. Interval is a super cool program that you should definitely check out. A user of both will likely notice some similarities (and likely just as many differences).