fix: Improve ICO decoding and UI consistency#2
Open
TYK7 wants to merge 1 commit intofeat/color-scheme-extractorfrom
Open
fix: Improve ICO decoding and UI consistency#2TYK7 wants to merge 1 commit intofeat/color-scheme-extractorfrom
TYK7 wants to merge 1 commit intofeat/color-scheme-extractorfrom
Conversation
This commit addresses issues related to ICO file decoding and refines UI aspects for better consistency. Changelog: Backend: - Integrated Apache Commons Imaging library (`1.0.0-alpha6`) for more robust parsing of ICO files, particularly for logos. - Implemented a fallback mechanism to `ImageIO` if Commons Imaging fails to decode an ICO. - Enhanced stream handling in `ColorExtractionService` to allow multiple parsing attempts on logo image streams (using `ByteArrayInputStream` to ensure `mark`/`reset` support). - Improved logging around logo image decoding to provide more clarity on success/failure of different parsing attempts. - Added comprehensive unit tests in `ColorExtractionServiceTest.java` to cover various scenarios of ICO and non-ICO logo decoding, including success and failure paths for both Commons Imaging and ImageIO. Frontend: - Corrected a CSS selector in `color-input-display.component.css` from `.color-info p` to `.color-details p` (and related `strong` tag selector) to ensure styles for color item details are correctly applied as per the HTML structure. - Verified that color names (defaulting to hex if no friendly name is available via `ColorNamer`) and sources are consistently passed from the backend and displayed in the UI. These changes aim to improve the reliability of logo color extraction, especially for websites using ICO files as favicons/logos, and ensure that UI styles are applied as intended.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit addresses issues related to ICO file decoding and refines UI aspects for better consistency.
Changelog:
Backend:
1.0.0-alpha6) for more robust parsing of ICO files, particularly for logos.ImageIOif Commons Imaging fails to decode an ICO.ColorExtractionServiceto allow multiple parsing attempts on logo image streams (usingByteArrayInputStreamto ensuremark/resetsupport).ColorExtractionServiceTest.javato cover various scenarios of ICO and non-ICO logo decoding, including success and failure paths for both Commons Imaging and ImageIO.Frontend:
color-input-display.component.cssfrom.color-info pto.color-details p(and relatedstrongtag selector) to ensure styles for color item details are correctly applied as per the HTML structure.ColorNamer) and sources are consistently passed from the backend and displayed in the UI.These changes aim to improve the reliability of logo color extraction, especially for websites using ICO files as favicons/logos, and ensure that UI styles are applied as intended.