Download the PHP package orbitale/imagemagick-php without Composer
On this page you can find all versions of the php package orbitale/imagemagick-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download orbitale/imagemagick-php
More information about orbitale/imagemagick-php
Files in orbitale/imagemagick-php
Package imagemagick-php
Short Description A system that allows creating commands to send to the exec() function to use ImageMagick's powerful features.
License MIT
Homepage https://github.com/Orbitale/ImageMagickPHP
Informations about the package imagemagick-php
ImageMagickPHP
An ImageMagick "exec" component for PHP apps.
Installation
Install with Composer, it's the best packages manager you can have :
Requirements
- PHP 7.2 or higher
- ImageMagick 7 has to be installed on your server, and the binaries must be executable by the user running the PHP process.
Settings
There are not many settings, but when you instantiate a new Command
object, you may specify ImageMagick's executable directory directly in the constructor, for example :
The constructor will automatically search for the magick
executable, test it, and throw an exception if it's not available.
⚠️ Make sure your ImageMagick binary is executable.
Usage
First, we recommend you to note all possible scripts that you can use with ImageMagick in the official docs:
These correspond to the "legacy binaries", and you can use them if you are familiar or comfortable with them.
As of ImageMagick 7, these are not mandatory, but this package is compatible with them.
Basic image type converter with ImageMagick's basic logo
Read the comments :
Resizing an image
Currently supported options:
There are a lot of command-line options, and each have its own validation system.
This is why a "few" ones are implemented now, to make sure validation is possible for each of them.
Note: If an option is not implemented in the Command
class, you can create an issue or make a Pull Request that implements the new option!
-annotate
-background
-blur
-colorspace
-crop
-depth
-draw
-extent
-fill
-flatten
-font
-gaussian-blur
-gravity
-interlace
-monochrome
-pointsize
-quality
-resize
-rotate
-size
-strip
-stroke
-thumbnail
-transpose
-transverse
xc:
Feel free to ask/create an issue if you need more!
Some aliases that do magic for you:
-
$command->text()
: This method uses multiple options added to the-annotate
one to generate a text block. You must specify its position and size, but you can specify color and the font file used. $command->ellipse()
: (check source code for the heavy prototype!) This method uses the-stroke
,-fill
and-draw
options to create an ellipse/circle/disc on your picture. Note: I recommend to check both the source code and the documentation to be sure of what you are doing.
Useful links
- ImageMagick official website: http://www.imagemagick.org
- ImageMagick documentation:
- Installation of the binaries (depending on your OS and/or distribution)
- Geometry option (to resize or place text)
- All command-line options ; they're not all available in this tool for now, so feel free to make a PR ! ;)
All versions of imagemagick-php with dependencies
ext-mbstring Version *
symfony/process Version ^5.3|^6.0|^7.0
symfony/polyfill-php80 Version ^1.10