Skip to content

Instantly share code, notes, and snippets.

@mseymour
Created November 11, 2013 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mseymour/7406834 to your computer and use it in GitHub Desktop.
Save mseymour/7406834 to your computer and use it in GitHub Desktop.
BannerImageExtension, for creating background banners on various pages.
<?php
class BannerImageExtension extends Extension {
public function ArtDirectionImage($width, $height) {
return $this->getFormattedImage('ArtDirectionImage', $width, $height);
}
public function generateArtDirectionImage(Image_Backend $backend, $width, $height) {
$backend->set_backend('ImagickBackend');
print 'SS3.1: BannerImageExtension backend: '.$backend->get_backend();
return $backend->croppedResize($width, $height);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment