You are here

function hook_imagemagick_pre_parse_file_alter in ImageMagick 8.2

Same name and namespace in other branches
  1. 8 imagemagick.api.php \hook_imagemagick_pre_parse_file_alter()

Alter the settings before an image is parsed by the ImageMagick toolkit.

ImageMagick does not support stream wrappers so this hook allows modules to resolve URIs of image files to paths on the local filesystem. Modules can also decide to move files from remote systems to the local file system to allow processing.

Parameters

\Drupal\imagemagick\ImagemagickExecArguments $arguments: The ImageMagick/GraphicsMagick execution arguments object.

Deprecated

in 8.x-2.5, will be removed in 8.x-3.0. Use an event subscriber to react on a ImagemagickExecutionEvent::ENSURE_SOURCE_LOCAL_PATH event.

See also

https://www.drupal.org/project/imagemagick/issues/3043136

\Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::parseFile()

\Drupal\imagemagick\ImagemagickExecArguments::getSource()

\Drupal\imagemagick\ImagemagickExecArguments::setSourceLocalPath()

\Drupal\imagemagick\ImagemagickExecArguments::getSourceLocalPath()

1 function implements hook_imagemagick_pre_parse_file_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

imagemagick_test_imagemagick_pre_parse_file_alter in tests/modules/imagemagick_test/imagemagick_test.module
Implements hook_imagemagick_pre_parse_file_alter().
1 invocation of hook_imagemagick_pre_parse_file_alter()
ImagemagickToolkit::parseFileViaGetImageSize in src/Plugin/ImageToolkit/ImagemagickToolkit.php
Parses the image file using the file metadata 'getimagesize' plugin.

File

./imagemagick.api.php, line 33
API documentation for the ImageMagick module.

Code

function hook_imagemagick_pre_parse_file_alter(\Drupal\imagemagick\ImagemagickExecArguments $arguments) {
}