feat: add pure-Perl Image::Magick CLI wrapper#494
Merged
Conversation
Implements Image::Magick API by delegating to ImageMagick CLI tools (magick for IM7, convert/identify for IM6). This provides the Image::Magick API without requiring native PerlMagick XS bindings. Key features: - Deferred execution model (operations queue as CLI flags, flush on Write/Get/Clone) for efficient process usage - Supports Read, Write, Set, Get, Clone, Composite, Montage, Ping, ImageToBlob, BlobToImage, Annotate, Draw, Compare, Append, Flatten - ~60 image manipulation methods via Mogrify dispatch - PerlMagick error constants exported - Auto-detects IM7 (magick) or IM6 (convert) at load time - Dies with install instructions if neither is found Test: 30/30 passing on macOS with ImageMagick 7 installed. Tests skip gracefully when ImageMagick CLI is not available. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Net::SSLeay is an XS module that cannot be built in PerlOnJava, so the blib/ and helper_script/ directories never exist. When Test::Pod is installed via CPAN into ~/.perlonjava/lib/, the test would run instead of skipping and report "not ok" for every missing file. Skip unconditionally with a comment explaining why. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Skills are canonical in .agents/; .cognition/ was a stale duplicate. The .agents/ copies are already up to date and more complete. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Complete list of all 150+ bundled modules organized by category, with implementation type (Java, Perl, or both) and special instructions for modules with external requirements (DBI/JDBC drivers, Image::Magick CLI tools, etc.). Linked from docs index and using-cpan-modules guide. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Remind developers to update docs/reference/bundled-modules.md when bundling new modules: - port-cpan-module SKILL.md: added to Documentation checklist - module-porting.md: added to Bundled Module Checklist and See Also - using-cpan-modules.md: added to See Also Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Points to the module porting guide and reminds developers to update this page when adding new modules. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Updated from 171 to 833 modules tested. Pass rate: 20.5% (171 pass). Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Fix _flush() clearing pending ops with `[]` (array ref) instead of `()` (empty list), which left a stray ARRAY ref in the pending queue. This caused Clone and any subsequent flush to pass "ARRAY(0x...)" as a file path to the magick command. Add three new test files: - mogrify.t: tests for Resize, Crop, Rotate, Flip, Flop, Negate, Scale, Thumbnail, Trim, Border operations (21 tests) - pipeline.t: tests for chained operations, Clone after Write, multi-format output, and blob round-trip (16 tests) - errors.t: tests for error handling — bad file, empty image, undefined methods, error constants (10 tests) Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
Summary
Adds a pure-Perl
Image::Magickmodule that wraps the ImageMagick CLI tools (magickfor IM7,convert/identifyfor IM6), providing the Image::Magick API without requiring native PerlMagick XS bindings.Also fixes a pre-existing
Net-SSLeayPOD test failure that surfaces whenTest::Podis CPAN-installed.Key features
magick) or IM6 (convert) at load time; dies with install instructions if neither is foundFiles
src/main/perl/lib/Image/Magick.pmsrc/test/resources/module/Image-Magick/t/basic.tmagicknot installed)dev/modules/image_magick.mdsrc/test/resources/module/Net-SSLeay/t/local/01_pod.tblib/for XS module)Net-SSLeay POD test fix
01_pod.tchecks POD inblib/lib/files, but Net::SSLeay is an XS module that cannot be built in PerlOnJava soblib/never exists. WhenTest::Podis installed via CPAN, the test runs instead of skipping and fails on the missing files. Now skipped unconditionally with a comment explaining why.Known limitation
When a user has previously installed the CPAN
Image::Magick(broken XS version) viajperl -MCPAN -e 'install Image::Magick', the CPAN copy in~/.perlonjava/lib/takes precedence over the jar-bundled version due to@INCordering. Users can fix this by copying our.pmover the installed one, or we can address@INCordering for bundled overrides in a follow-up.Test plan
01_pod.tnow skips cleanly instead of failingmakepasses (all unit tests green)Generated with Devin