Skip to content

Feature/image processing enhancements#2

Closed
JacobBorden wants to merge 3 commits intodevelopmentfrom
feature/image-processing-enhancements
Closed

Feature/image processing enhancements#2
JacobBorden wants to merge 3 commits intodevelopmentfrom
feature/image-processing-enhancements

Conversation

@JacobBorden
Copy link
Owner

No description provided.

google-labs-jules bot and others added 3 commits May 23, 2025 23:39
This commit introduces several enhancements to the bitmap image processing library:

Added:
- New image manipulation functions:
    - Invert Colors: Inverts the RGB values of each pixel.
    - Sepia Tone: Applies a classic sepia filter.
    - Box Blur: Applies a configurable box blur effect.
- Comprehensive unit testing framework (`tests/test_bitmap.cpp`) using CMake/CTest.
- Unit tests covering:
    - Pixel-level operations (Greyscale, Invert, Sepia, Brightness, Contrast, Saturation, Luminance, including color-specific variants).
    - Image-level operations (BoxBlur, Shrink, Rotate, and basic validity checks for others).
- `README.md`: Details project features, dependencies, build instructions, and basic usage.
- `CHANGELOG.md`: Tracks changes, starting with this set of enhancements as v0.1.0.

Changed:
- Refined contrast adjustment logic for secondary colors (Magenta, Yellow, Cyan) to apply contrast directly to their constituent primary color channels for more predictable results.
- Significantly improved inline code documentation in `src/bitmap.h` and `src/bitmap.cpp` for all functions, enhancing clarity on purpose, parameters, and logic.
- Standardized clamping of pixel color components to the 0-255 range across various functions.
- Refactored `main.cpp` to serve as a clearer demonstration of library features, including new functions and better error handling for file operations.

Fixed:
- Corrected syntax errors in the original implementations of `ChangePixelContrastMagenta` and `ChangePixelContrastCyan`.
- Addressed incorrect variable usage (e.g., `magenta` vs `cyan`) in `ChangePixelContrastCyan`.
- Corrected `std::min` usage in several saturation and luminance functions.
- Improved GDI resource management in `ScreenShotWindow` by ensuring proper cleanup of device contexts and bitmap handles.
- Corrected minor typos in function parameter names and conditional logic in some pixel manipulation functions.
This commit addresses several issues in the CMake configuration:

- Updated `cmake_minimum_required` in the root `CMakeLists.txt` from VERSION 3.0.0 to VERSION 3.10 to align with modern CMake practices and resolve a deprecation warning.
- Corrected the CPack module inclusion in the root `CMakeLists.txt` from `include(Cpack)` to `include(CPack)`, fixing a case-sensitivity error that prevented CMake from finding the module.

Note: Similar `cmake_minimum_required` deprecation warnings and CPack inclusion errors may still appear from external dependencies (`dependencies/bitmapfile` and `dependencies/matrix`) which are managed via `FetchContent`. These issues reside within the external projects themselves and are not directly modifiable in this repository. The changes in this commit resolve the errors originating from the project's own CMake scripts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant