Frame Smith is a desktop image editor. It applies a chain of filters to an image. You see the result at once. You can reorder the filters in the chain.
The project uses the Vala language and the GTK toolkit. It builds with Meson. It is a compact portfolio project.
- Open common image formats through GdkPixbuf.
- Blur images with a Gaussian kernel.
- Sharpen images with an unsharp mask.
- Detect edges with the Sobel operator.
- Split luminance with a threshold.
- Adjust black point, white point, and gamma.
- Reorder the filter chain.
- View a per-channel histogram.
- Save the result as PNG, JPEG, BMP, or TIFF.
The project has two layers.
The core layer is src/libframesmith. It holds the pixel math. It has no toolkit code. This layer runs without a display. The tests use this layer directly.
The GUI layer is src/framesmith. It handles the window and the controls. It converts between Image and Gdk.Pixbuf. It never processes pixels itself.
The processing flow is simple:
- Load an image from a file.
- Convert the image to the internal RGBA format.
- Apply each filter in the chain.
- Convert the result back to a pixbuf.
- Show the result and its histogram.
Build the project on Linux. Use these packages:
- GTK 3.22 or newer
- GdkPixbuf 2.40 or newer
- Vala 0.48 or newer
- Meson 0.61 or newer
- Ninja
On Ubuntu, install them with this command:
sudo apt install valac meson ninja-build libgtk-3-dev libgdk-pixbuf-2.0-dev
Do these steps to build the project:
- Run
meson setup build. - Run
meson compile -C build.
The build uses --fatal-warnings. A Vala warning stops the build.
Run the tests with this command:
meson test -C build --print-errorlogs
The tests run without a display. They cover the filter math, the chain, and the file round trip.
Start the program with this command:
./build/framesmith data/sample.png
The file data/sample.png is a test image. It has a sky, a sun, a hill, and a checker strip.
Follow these steps to edit an image:
- Click Open and choose an image.
- Choose a filter and click Add.
- Select the filter in the list.
- Change the filter parameters.
- Use the Up and Down buttons to reorder the chain.
- Click Save As to write the result.
The test programs print lines like these:
ok identity kernel preserves pixels
ok gaussian blur keeps constant image
ok gaussian blur spreads an impulse
ok sharpen keeps constant image
ok sharpen amplifies contrast
ok edge finds a step edge
ok edge ignores flat regions
ok threshold splits luminance
ok threshold invert
ok levels remap and clamp
ok levels gamma
ok histogram counts channels
ok chain applies in order
ok chain move reorders
ok empty chain is a copy
core: 15 passed, 0 failed
ok loads the sample image
ok round trips png losslessly
io: 2 passed, 0 failed
The expected visual effects are simple. Blur softens the hill edge. Sharpen makes the checker squares stand out. Edge detect turns the shapes into outlines. Threshold turns the image into black and white.
The script tools/generate_sample.py creates the sample image. It uses only the Python standard library. The image is deterministic. The script has a --check mode. This mode compares decoded pixels, not file bytes.
- The project builds on Linux. Windows builds are not supported.
- The preview renders at full resolution. Very large images can be slow.
- There is no undo or redo yet.
- The chain order changes with buttons, not by dragging.
- Each filter has one parameter set. There is no curves editor yet.
Version 0.2:
- Add drag-and-drop reordering.
- Add undo and redo.
- Add preview downscaling for large images.
Version 0.3:
- Port the GUI to GTK 4.
- Add a per-channel curves editor.
Version 0.4:
- Add sepia, vignette, and noise filters.
- Add batch processing from the command line.
Frame Smith is released under the MIT License. See the LICENSE file.