Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend image-io capabilities with TwelveMonkeys plugins #191

Merged
merged 1 commit into from
Dec 23, 2023

Conversation

rob93c
Copy link
Member

@rob93c rob93c commented Dec 23, 2023

This pull request also fixes the MIME type regex, it was unable to match values such as image/vnd.microsoft.icon or image/vnd.adobe.photoshop.

Summary by CodeRabbit

  • New Features

    • Expanded image format support to include BMP, JPEG, and PSD.
  • Bug Fixes

    • Enhanced MIME type recognition to cover a broader range of image subtypes.
  • Tests

    • Updated tests to reflect new image format handling and MIME type changes.
    • Added tests for image resizing and conversion processes.

…unit tests to check new format support, fix mime type regex to correctly match values containing hyphens or dots
@rob93c rob93c added enhancement New feature or request unit test This marks issues revolving around unit tests dependencies Pull requests that update a dependency file logs This marks changes revolving around logs labels Dec 23, 2023
@rob93c rob93c self-assigned this Dec 23, 2023
Copy link
Contributor

coderabbitai bot commented Dec 23, 2023

Walkthrough

The project has expanded its image processing capabilities, adding support for additional image formats (BMP, JPEG, PSD) and refining MIME type handling to be more inclusive. Tests have been updated to reflect these changes, with new test cases for resizing and converting favicon, TIFF, and PSD images, and the MIME type in a logger test has been changed to a more complex example.

Changes

File Path Change Summary
build.gradle Added dependencies for BMP, JPEG, PSD image formats.
.../stickerify/logger/SubstringHighlighter.java Modified MIME_TYPE_PATTERN for broader character support in subtype.
.../stickerify/logger/SubstringHighlighterTest.java Updated MIME_TYPE to "image/vnd.microsoft.icon".
.../stickerify/media/MediaHelperTest.java Added tests for favicon, TIFF, PSD image resizing and conversion.

Poem

🐇✨
In the code's burrow, deep and wide,
New formats in the warren hide.
Pixels dance in BMP, PSD,
A rabbit's work, done with glee! 🎉
🐇✨

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ?


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
  • You can tag CodeRabbit on specific lines of code or entire files in the PR by tagging @coderabbitai in a comment. Examples:
  • You can tag @coderabbitai in a PR comment and ask questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions. Examples:
    • @coderabbitai render interesting statistics about this repository as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai generate unit tests for the src/utils.ts file.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between fbc04f5 and 477e1b7.
Files ignored due to filter (3)
  • gradle/libs.versions.toml
  • src/test/resources/favicon.ico
  • src/test/resources/valid.tiff
Files selected for processing (4)
  • build.gradle (1 hunks)
  • src/main/java/com/github/stickerifier/stickerify/logger/SubstringHighlighter.java (1 hunks)
  • src/test/java/com/github/stickerifier/stickerify/logger/SubstringHighlighterTest.java (1 hunks)
  • src/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.java (2 hunks)
Additional comments: 5
build.gradle (1)
  • 13-15: Added dependencies for BMP, JPEG, and PSD image formats are consistent with the PR objectives to enhance image I/O capabilities.
src/main/java/com/github/stickerifier/stickerify/logger/SubstringHighlighter.java (1)
  • 29-29: The updated regex pattern for MIME types now allows a broader range of characters, which aligns with the PR objective to fix the MIME type regex pattern issue. Ensure that this change is thoroughly tested to prevent any regressions or unintended matches.
src/test/java/com/github/stickerifier/stickerify/logger/SubstringHighlighterTest.java (1)
  • 18-18: The change in the MIME_TYPE constant from "image/png" to "image/vnd.microsoft.icon" is consistent with the PR objective to handle more complex MIME types and should be reflected in the associated tests.
src/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.java (2)
  • 100-121: New test methods for resizing and concurrent conversions of favicon, TIFF, and PSD images have been added, which aligns with the PR objectives to support these formats. Ensure that these tests cover all necessary cases and are passing.

  • 303-324: The addition of test methods for concurrent conversions of favicon, TIFF, and PSD images is a good practice to ensure thread safety and performance under load. These tests should be executed to verify that the concurrent processing is handled correctly.

Copy link
Contributor

@MartelliEnrico MartelliEnrico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rob93c rob93c merged commit ad95c19 into main Dec 23, 2023
7 checks passed
@rob93c rob93c deleted the add-twelvemonkeys-plugins-to-extend-image-support branch December 23, 2023 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request logs This marks changes revolving around logs unit test This marks issues revolving around unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants