localgod / karla
ImageMagick wrapper
v1.1.0
2025-12-18 08:14 UTC
Requires
- php: ^8.0
Requires (Dev)
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^10.5
- squizlabs/php_codesniffer: ^4.0
- dev-master
- v1.1.0
- v1.0.2
- v1.0.1
- v1.0.0
- dev-copilot/feature-replace-shell-exec-with-proc-open
- dev-copilot/add-input-output-methods
- dev-copilot/refactor-extract-command-builder-class
- dev-copilot/add-optional-version-parameter
- dev-copilot/refactor-remove-singleton-pattern
- dev-copilot/add-matrix-testing-imagemagick-6-7
- dev-copilot/refactor-create-platform-utility-class
- dev-copilot/update-clone-method-docs
- dev-copilot/add-path-traversal-validation
- dev-dependabot/npm_and_yarn/multi-bf05dc1ecf
- dev-copilot/security-add-shell-argument-escaping
- dev-copilot/update-actions-for-node-24
- dev-copilot/check-build-documentation-failure
- dev-copilot/investigate-skipped-checks
- dev-copilot/fix-issue-178
This package is auto-updated.
Last update: 2026-03-26 14:48:04 UTC
README
Karla is an ImageMagick wrapper written in PHP with support for method chaining.
✨ Now with ImageMagick 7 support! Automatically detects and works with both ImageMagick 6 and 7.
Requirements
- PHP 8.0+ (8.2+ recommended)
- ImageMagick 6.x or 7.x
- PHP extensions: pcre, SPL (default in most distributions)
- shell_exec() must be enabled
Supported Versions
CI matrix tests the following combinations:
| PHP | ImageMagick 6 | ImageMagick 7 |
|---|---|---|
| 8.2 | ✅ Linux | ✅ Linux |
| 8.3 | ✅ Linux | ✅ Linux |
| 8.4 | ✅ Linux/macOS | ✅ Linux/macOS/Windows |
Installation
composer require localgod/karla
Getting Started
use Karla\Karla; $karla = new Karla('/path/to/imagemagick/'); $karla->convert() ->input('photo.jpg') ->resize(800, 600) ->output('photo-resized.jpg') ->execute();
See the documentation for more examples and usage details.
Contributing
Contributions are welcome! See CONTRIBUTE.md for development setup, testing guidelines, and how to submit pull requests.