function _drush_image_derive

8.0.x image.inc _drush_image_derive($style_name, $source)
8.0.x image_7.inc _drush_image_derive($style_name, $source)
7.x image.inc _drush_image_derive($style_name, $source)
7.x image_7.inc _drush_image_derive($style_name, $source)
master image.inc _drush_image_derive($style_name, $source)
master image_7.inc _drush_image_derive($style_name, $source)
1 call to _drush_image_derive()

File

commands/core/drupal/image_7.inc, line 37
Specific functions for a Drupal image handling. drush_include_engine() magically includes either this file or image_X.inc depending on which version of Drupal is in use.

Code

function _drush_image_derive($style_name, $source) {
  $image_style = image_style_load($style_name);
  $scheme = file_default_scheme();
  $image_uri = $scheme . '://' . $source;
  $derivative_uri = image_style_path($image_style['name'], $image_uri);
  if (image_style_create_derivative($image_style, $source, $derivative_uri)) {
    return $derivative_uri;
  }
}