* Modules can also decide to move files from remote systems to the local
* file system to allow processing.
*
- * @param \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit $toolkit
- * The Imagemagick toolkit instance to alter.
+ * @param \Drupal\imagemagick\ImagemagickExecArguments $arguments
+ * The ImageMagick/GraphicsMagick execution arguments object.
*
* @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::parseFile()
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::getSource()
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::setSourceLocalPath()
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::getSourceLocalPath()
+ * @see \Drupal\imagemagick\ImagemagickExecArguments::getSource()
+ * @see \Drupal\imagemagick\ImagemagickExecArguments::setSourceLocalPath()
+ * @see \Drupal\imagemagick\ImagemagickExecArguments::getSourceLocalPath()
*/
-function hook_imagemagick_pre_parse_file_alter(\Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit $toolkit) {
+function hook_imagemagick_pre_parse_file_alter(\Drupal\imagemagick\ImagemagickExecArguments $arguments) {
}
/**
* to move temporary files from the local file system to remote destination
* systems.
*
- * @param \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit $toolkit
- * The Imagemagick toolkit instance to alter.
+ * @param \Drupal\imagemagick\ImagemagickExecArguments $arguments
+ * The ImageMagick/GraphicsMagick execution arguments object.
*
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::getDestination()
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::getDestinationLocalPath()
* @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::save()
+ * @see \Drupal\imagemagick\ImagemagickExecArguments::getDestination()
+ * @see \Drupal\imagemagick\ImagemagickExecArguments::getDestinationLocalPath()
*/
-function hook_imagemagick_post_save_alter(\Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit $toolkit) {
+function hook_imagemagick_post_save_alter(\Drupal\imagemagick\ImagemagickExecArguments $arguments) {
}
/**
* The toolkit provides methods to prepend, add, find, get and reset
* arguments that have already been set by image effects.
*
+ * In addition to arguments that are passed to the binaries command line for
+ * execution, it is possible to push arguments to be used only by the toolkit
+ * or the hooks. You can add/get/find such arguments by specifying
+ * ImagemagickExecArguments::INTERNAL as the argument $mode in the methods.
+ *
* ImageMagick automatically converts the target image to the format denoted by
* the file extension. However, since changing the file extension is not always
* an option, you can specify an alternative image format via
- * $toolkit->setDestinationFormat('format'), where 'format' is a string
- * denoting an Imagemagick supported format.
+ * $arguments->setDestinationFormat('format'), where 'format' is a string
+ * denoting an Imagemagick supported format, or via
+ * $arguments->setDestinationFormatFromExtension('extension'), where
+ * 'extension' is a string denoting an image file extension.
+ *
* When the destination format is set, it is passed to ImageMagick's convert
* binary with the syntax "[format]:[destination]".
*
- * @param \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit $toolkit
- * The Imagemagick toolkit instance to alter.
+ * @param \Drupal\imagemagick\ImagemagickExecArguments $arguments
+ * The ImageMagick/GraphicsMagick execution arguments object.
* @param string $command
- * The Imagemagick binary being called.
+ * The ImageMagick/GraphicsMagick command being called.
*
* @see http://www.imagemagick.org/script/command-line-processing.php#output
* @see http://www.imagemagick.org/Usage/files/#save
*
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::getArguments()
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::prependArgument()
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::addArgument()
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::findArgument()
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::resetArguments()
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::getSource()
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::setSourceLocalPath()
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::getSourceLocalPath()
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::getDestination()
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::setDestinationLocalPath()
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::getDestinationLocalPath()
+ * @see \Drupal\imagemagick\ImagemagickExecArguments
* @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::convert()
- * @see \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::identify()
+ * @see \Drupal\imagemagick\Plugin\FileMetadata\ImagemagickIdentify::identify()
*/
-function hook_imagemagick_arguments_alter(\Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit $toolkit, $command) {
+function hook_imagemagick_arguments_alter(\Drupal\imagemagick\ImagemagickExecArguments $arguments, $command) {
}