This project, Color-Screen, is a high-performance color screening and image processing application. It utilizes a modular C++ architecture with a focus on color accuracy and optimized rendering.
- Language: C++ (Standard: C++17)
- Build System: GNU Autotools (
autoconf,automake,libtool) - Primary Goal: Implement highly optimized tools to reconstruct colors from digitized early color photographs
- Primary Build Directory: Rebuilding should always be performed in the
build-qtsubdirectory to keep the source tree clean. - Compiler Requirements: Supports GCC (14/15) and Clang.
- Parallelism: Uses OpenMP for multi-threaded performance. Parallelism is highly encouraged, especially in
libcolorscreen. - Dependencies: Qt6, FFmpeg, Lensfun, GSL, etc.
Always build out-of-tree in the build-qt directory:
cd build-qt
# If you need a fresh start:
# rm -rf *
# ../configure [flags]To ensure optimal performance and compatibility (especially with GCC 15 + Qt6), use the following configuration:
CXXFLAGS="-Ofast -march=native -Wall -g" \
CFLAGS="-Ofast -march=native -Wall -g" \
../configure --prefix=$HOME/Color-Screen-install --enable-qtgui --enable-maintainer-mode --prefix=/home/jan/barveni-bin --enable-gtkgui Configuring with --enable-checking defines the COLORSCREEN_CHECKING macro. Heavyweight consistency checks and additional tests should be guarded by this macro to keep production builds fast.
Use parallel builds to speed up the process:
make -j$(nproc)
make install-stripThe project includes a comprehensive testsuite covering libcolorscreen features. Tests are invoked using:
make -j$(nproc) check- Unit Tests: Implemented in
src/libcolorscreen/unittests.C. - CLI Tests: The command-line tool
colorscreencan be tested using scripts located in thetestsuite/subdirectory.
The project uses GitHub Actions for automated testing. Workflows are defined in .github/workflows/ and cover:
- Ubuntu: Linux builds and tests.
- macOS: Apple Silicon and Intel builds.
- Windows: MSYS2/MinGW-w64 builds.
src/libcolorscreen/: Core rendering and processing library.src/libcolorscreen/include: Public API of the library.src/colorscreen: Command line utility accessing main functions of the library.src/qtgui/: Qt6-based graphical user interface. See Developer Docssrc/gtkgui/: Legacy GTK-based interface (if enabled) to be deprecated soon.testsuite/: Unit tests and verification suites (Check tests/Makefile.am for test registration).m4/: Autoconf macros
The project uses different coding styles for its components:
-
src/libcolorscreen/: Follows the GNU coding style. C++ files uses .C extensions -
src/colorscreen/: Follows the GNU coding style. C++ files uses .C extensions -
src/gtkgui/: Follows the GNU coding style. C++ files uses .C extensions -
src/qtgui/: Follows the Qt-like style. C++ files uses .cpp extension. -
Every function should have comment what it does. In GNU style sections it should explain all function parameters in upper case
-
Every global class and enum should also have comment
-
Memory: Use RAII and Smart Pointers (
std::unique_ptr,std::shared_ptr). Raw new/delete should only be used when necessary to interface legacy code.
- After larger achivements we can do celebratory animations similar to
src/qtgui/JolyAnimation.cpp
- Linker Errors: If static linking fails, try adding
--disable-static-linkto the configure flags. - Dependencies: Ensure
pkg-configcan find development headers forlcms2,libzip,libraw,libtiff, andfftw3.