A lightweight, command-driven image editor built in C++, capable of interpreting text-based instruction files to perform image manipulations like creating blank images, adding images, applying effects, and saving the results.
This project was initially developed as part of an academic assignment at Faculdade de Engenharia da Universidade do Porto (FEUP).
The baseline code and structure were provided by FEUP, and subsequently extended by our team:
- Afonso Lima
- Daniel Rama
- Diogo Coelho
We expanded the functionality by implementing:
- New commands
- The Image class
- The Color class
- The ScrimParser class
This allowed the program to interpret more advanced image editing instructions and manage image data internally with more control.
.
├── build/ # Build output
├── cmake-build-debug/ # CMake debug build
├── expected/ # Expected output images for validation
├── include/ # Header files
├── input/ # Input images
├── main/ # Main program file
├── output/ # Generated images from commands
├── scrims/ # Command script files (.txt)
├── src/ # Source code (.cpp)
├── CMakeLists.txt # CMake build file
└── test_log.txt # Log file from tests
- Build the project (if not already built)
Using CMake:
cmake .
makeOr via your preferred C++ IDE (CLion / Visual Studio / VSCode C++ plugin)
- Run the program via the tester executable
The project includes a tester.exe (on Windows builds) to run and validate command sequences.
Example (on terminal / command prompt):
./tester.exe scrims/add1.txtThis will process the commands in scrims/add1.txt and output images to the /output/ directory.
A .txt file with commands might look like:
Blank w:400 h:400 fill:255:0:0
Add
Save filename:output/add1.png
Available commands include:
Blank— Creates a new image of specified width, height and fill colorOpen— Opens an existing imageAdd— Adds an image to the canvasSave— Saves the image to a file
…and more depending on your custom implementation.
- Text-based command interpretation for image editing
- Load, save and combine images
- Color management via the
Colorclass - Image manipulation through the
Imageclass - Custom parser for reading command scripts
- Easy to test and debug via
tester.exe
- Afonso Lima
- Daniel Rama
- Diogo Coelho
Base structure and original implementation by Faculdade de Engenharia da Universidade do Porto (FEUP).