π€ Contributing to Capture Moment¶
Welcome and thank you for your interest in the open-source professional photo editing project, Capture Moment! Your contributionsβwhether code, documentation, bug reports, or feature ideasβare critical to achieving our goal of becoming a leading non-destructive photo workflow solution.
π¦ Ways to Contribute¶
We encourage contributions across all facets of the project. Please choose the appropriate channel for your submission:
π 1. Reporting Issues and Bugs¶
If you find a malfunction or unexpected behavior, please file a comprehensive "Issue" on our GitHub repository. A high-quality bug report should include:
- Version Details: The application version or the specific commit hash.
- Environment: Your Operating System (Windows, macOS, Linux) and compiler used.
- Steps to Reproduce: A precise, step-by-step description of how to trigger the bug.
- Expected vs. Observed: A clear distinction between the desired outcome and the actual result.
β¨ 2. Proposing Features¶
New feature suggestions and architectural discussions must begin with an "Issue." This allows the core team and community to validate the design and approach, ensuring alignment with the project's long-term vision before significant development effort is expended.
π» 3. Submitting Code (Pull Requests)¶
For all code contributions (bug fixes, new features, or performance enhancements), please follow the established environment setup and submission process outlined below.
π οΈ Setting Up Your Development Environment¶
Capture Moment relies on a complex, high-performance C++ toolchain (C++20/23, Halide, OIIO, Qt6, etc) requiring meticulous setup.
- Global Prerequisites: Ensure all global prerequisites (Git, CMake 3.21+, C++23 Compiler) are installed as detailed in the main guide.
- Build Guide: Refer to the Building guide for platform-specific instructions (Windows, Linux, macOS) and the correct usage of Vcpkg (strongly recommended for robust dependency management).
βοΈ Development CMake Configuration¶
To ensure all necessary checks and components are available during development, you must explicitly enable the UI and the test suite:
# Example configuration for development (enables Desktop UI and Tests)
cmake --preset debug-vcpkg-msvc -Ddesktop_ui=ON -Dtests=ON
# Compilation
cmake --build build/debug-vcpkg-msvc
π Code Standards and Pull Request Lifecycle¶
Adherence to these standards is mandatory for all code submissions to be accepted.
1. Naming Conventions & Style
-
Language Standard: All source code must conform to the C++20/C++23 standard.
-
Formatting: We enforce a consistent style guide (e.g., derived from LLVM or Google Style). It is required to use clang-format prior to submission.
-
Namespaces: Core application logic must be encapsulated within the CaptureMoment:: namespace.
-
Testing: All new features, performance-critical code changes, and complex bug fixes must be accompanied by unit tests.
βοΈ License Agreement¶
By submitting code, documentation, or any other material to the Capture Moment repository, you agree to license your contributions under the GNU General Public License v3 (GPLv3). This ensures that the project remains free and open for the entire community.¶
π οΈ How to Contribute in Development¶
Core¶
Core UI (Qt)¶
Adding a New Operation (e.g., Vignette)¶
- Define Operation Type: Add
Vignetteto theOperationTypeenum in the Core. - Create Operation Implementation: Define
OperationVignetteclass in the Core that implements the newexecute(IWorkingImageHardware&, const OperationDescriptor&)method andappendToFusedPipelinefor pipeline fusion. - Register Operation: Add
OperationVignetteto theOperationRegistry::registerAllfunction in the Core. - UI Integration: Create a corresponding operation model in
ui_core(VignetteModel) and expose it to QML viaOperationModelManager.
Adding a New Serialization Strategy¶
- Define Strategy Interface: (If not already done for the new strategy type).
- Implement Strategy: Create a new class implementing the required interface (e.g.,
IXmpPathStrategy) in the Core. - Configure in App Startup: Inject the new strategy implementation into the
FileSerializerManagerand subsequently into theSerializerControllerduring application setup. - No UI Code Change Required: The
SerializerControllerabstracts the core details, so the UI layer (QML) does not need modification.