SQL for image processing
SQL inspired command-line image processing. Note - very much still a work in progress; everything is subject to change.
WARNING Currently only works with basic BMP files. Does not handle indexed BMPs or any kinds of RLE compression or anything like that. At its current stage, pixQL is working on experimenting with and finalizing its design before I'll do more work with compatibility/robustness.
That said, any bug reports, compatibility gaps, suggestions, etc... are welcome!
Update: Temporary fix to compatibility issues: Added a simple bash script (pixQL/example_scripts/pixql_c) that adds other image compatibility to pixql. It simply uses ImageMagick to convert the files you supply it to and from BMP in passing them to pixQL. Takes same arguments as pixQL.
Goal: Use simple, clean, composable rules to allow for precise pixel-level image operations.
This document is rather informal, as pixQL is still early in development. Also, I've never written much technical documentation before- any help or suggestions welcome!
##overview The general idea is that you can supply an input image, and define a subset of pixels that you'd like to "select" (example: "give me all the pixels on the left half of the image"). You can then specify an operation you'd like to be applied on each of those pixels ("invert the pixels"). Using a series of selections and operations, you can perform complex image manipulations.
##license I am still in the process of deciding on a license... If you have any feedback or suggestions on this process, see the open issue on this subject at github.com.
##installation
# note- currently only tested on OSX Yosemite. In theory, should work on most *nix style stuff...
git clone [email protected]:Phildo/pixQL.git
cd pixQL
make
mv pixql /usr/local/bin/
pixql [-i input_file] [-o output_file] [-q query | -qf query_file]
##example simple usage
…
SELECT WHERE 1; OPERATE SET R = R/2; OPERATE SET G = G/2; OPERATE SET B = B/2; SELECT WHERE row >= HEIGHT/60 AND row = HEIGHT/61 AND row = HEIGHT/62 AND row = HEIGHT/63 AND row = HEIGHT/64 AND row = HEIGHT/65 AND row < HEIGHT/6*6; OPERATE SET R = OUT.R+(255/2); OPERATE SET B = OUT.B+(255/2);
No open issues yet, or sync has not completed.