diff --git a/README.md b/README.md index 5580f33..a4f69a8 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,6 @@ SilverStripe 3.3+ (SS 3.1+ support available in earlier releases) ## To Do - * ImageMagick support (maybe already works - can anyone confirm?) * Internationalisation * Advanced cropping options and interfaces (may be an additional module) * Auto detect focus point via Imagga API diff --git a/_config/config.yml b/_config/config.yml index dc6f8ff..75ca9c6 100644 --- a/_config/config.yml +++ b/_config/config.yml @@ -5,6 +5,9 @@ After: 'framework/*','cms/*' Image: extensions: - FocusPointImage + # Injector: +# ImagickBackend: +# class: "FPImagickBackend" # Image: # class: FPImage diff --git a/code/FPImagickBackend.php b/code/FPImagickBackend.php new file mode 100644 index 0000000..863346c --- /dev/null +++ b/code/FPImagickBackend.php @@ -0,0 +1,18 @@ +cropImage($width, $height, $left, $top); + + return $new; + } +} +?> \ No newline at end of file diff --git a/docs/en/installation.md b/docs/en/installation.md index 9d5aed7..442c9f7 100644 --- a/docs/en/installation.md +++ b/docs/en/installation.md @@ -11,3 +11,13 @@ See the [packagist listing](https://packagist.org/packages/jonom/focuspoint) and ### Manually I promise it's worth your time to learn how to use Composer. If painless updating isn't your thing though you can download and extract this project, rename the module folder 'focuspoint', place it in your project root and run a dev/build?flush=1. + + +### Using Focus Point with ImageMagick + +If you are using the ImageMagick you must use [injector](https://docs.silverstripe.org/en/developer_guides/extending/injector/) to replace the ImagickBackend with the wrapper FPImagickBackend for compatibility using the below: +```yml +Injector: + ImagickBackend: + class: "FPImagickBackend" +```