mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-05-15 18:55:56 +00:00

# Description of Changes Please provide a summary of the changes, including: - What was changed -Grayscale Image Compression: Modified the compressImagesInPDF method to optionally convert images to grayscale during compression. This is achieved by checking if the grayScale flag is true (or if the image is already in grayscale) and then processing the image accordingly. UI Update: Updated the compress-pdf.html file by adding a checkbox for grayscale compression. Additionally, a new translation key compress.grayscale.label with the text "Apply Grayscale for Compression" has been added across all supported languages. - Why the change was made -Enhanced Compression Options: This feature provides users with an option to compress images in PDFs more effectively by reducing the color complexity, which can lead to smaller file sizes. Improved Flexibility: It allows users to decide whether they want to maintain the original color images or opt for a grayscale version. - Any challenges encountered - The translation for compress.grayscale.label was generated using an automated translator, so it might not be completely accurate and could require further review. Closes #2603 --- ## Checklist ### General - [x] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [x] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md) (if applicable) - [x] I have performed a self-review of my own code - [x] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [x] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing) for more details.