Freud CLI Reference
This page is a quick reference for the freud command-line tool: how to invoke it, what flags it accepts, and how each feature should behave.
For how to implement a new feature — adding a function, wiring the dispatch, reading and writing images — see Freud Internals.
For background on the project workflow, see Workflows & Milestones.
Basic usage
./freud.exe -f <image> -c <command>| Flag | Description |
|---|---|
-f <path> |
Input image path. Can be repeated for commands that take multiple images. |
-c <command> |
Feature to run. Must match an entry in freud.manifest. |
-o <path> |
Output image path. Default: image_out.bmp |
--debug |
Print debug information (image loaded, dimensions, etc.) |
--version |
Print version and exit |
Example invocations
# Print image dimensions
./freud.exe -f images/input/image.jpeg -c dimension
# Make the image red
./freud.exe -f images/input/image.jpeg -c color_red
# Rotate clockwise and save with custom name
./freud.exe -f images/input/image.jpeg -c rotate_cw -o rotated.bmp
# Debug mode (prints image info before running)
./freud.exe --debug -f images/input/image.jpeg -c dimensionFeature index
Milestone 1 — Tutorial
| Command | Feature | Output |
|---|---|---|
helloworld |
- | Prints Hello World! |
dimension |
#1 | dimension: <width>, <height> |
color_first_pixel |
#2 | color_first_pixel: R, G, B |
color_10th_pixel |
#3 | color_10th_pixel: R, G, B |
color_first_pixel_second_line |
#4 | color_first_pixel_second_line: R, G, B |
pixelRGB |
#5 | Uses pixelRGB struct, get and print functions |
Milestone 2 — Statistics
| Command | Feature | Output |
|---|---|---|
max_pixel |
#6 | max_pixel (x, y): R, G, B |
min_pixel |
#7 | min_pixel (x, y): R, G, B |
max_component |
#8 | max_component: value |
min_component |
#9 | min_component: value |
full_report |
#10 | Writes a .txt file with all statistics |
Milestone 3 — Colors
| Command | Feature | Output |
|---|---|---|
color_red |
#11 | Image with only red channel kept |
color_green |
#12 | Image with only green channel kept |
color_blue |
#13 | Image with only blue channel kept |
grayscale |
#14 | Grayscale via channel averaging |
invert |
#15 | Each channel inverted (255 − value) |
luminance |
#16 | Grayscale via luminance formula |
desaturate |
#25 | Desaturated image |
Milestone 4 — Transforms
| Command | Feature | Output |
|---|---|---|
rotate_cw |
#17 | Image rotated 90° clockwise |
rotate_ccw |
#18 | Image rotated 90° counter-clockwise |
mirror_h |
#19 | Mirror effect — horizontal symmetry |
mirror_v |
#20 | Mirror effect — vertical symmetry |
mirror |
#21 | Mirror effect (combined) |
crop |
#22 | Cropped image |
Milestone 5 — Resize
| Command | Feature | Output |
|---|---|---|
scale_nn |
#23 | Scale via nearest-neighbor interpolation |
scale_bilinear |
#24 | Scale via bilinear interpolation |
Note: Check each feature’s issue file in Features for the exact expected output format. The CI compares output character by character — spacing and capitalization must match exactly.
The manifest file
freud.manifest is a plain text file at the project root. It lists every command your binary supports, one per line:
helloworld
dimension
color_first_pixel
color_red
Rules: - One command per line, no spaces, no quotes - The CI reads this file to know which features to test - If a command is implemented but missing from the manifest, the CI will not test it - If a command is in the manifest but not implemented, the CI test will fail
Ready to write code? See Freud Internals for the template file layout, the Config struct, image I/O, and the four-step feature wiring pattern.