You are here

smartcrop.module in Smart Crop 6

Same filename and directory in other branches
  1. 7 smartcrop.module

File

smartcrop.module
View source
<?php

require_once 'imageapi_gd.inc';

/**
 * Implementation of hook_imagecache_actions().
 */
function smartcrop_imagecache_actions() {
  $actions = array();
  $actions['smartcrop_scale_and_crop'] = array(
    'name' => 'Scale and Smart Crop',
    'description' => 'Similar to "Scale And Crop", but preserves the portion of the image with the most entropy.',
    'file' => 'smartcrop_actions.inc',
  );
  $actions['smartcrop_crop'] = array(
    'name' => 'Smart Crop',
    'description' => 'Similar to "Crop", but preserves the portion of the image with the most entropy.',
    'file' => 'smartcrop_actions.inc',
  );
  return $actions;
}

/**
 * Implementation of hook_theme().
 */
function smartcrop_theme() {
  $theme = array(
    'smartcrop_scale_and_crop' => array(
      'file' => 'smartcrop_actions.inc',
      'arguments' => array(
        'element' => NULL,
      ),
    ),
    'smartcrop_crop' => array(
      'file' => 'smartcrop_actions.inc',
      'arguments' => array(
        'element' => NULL,
      ),
    ),
  );
  return $theme;
}

Functions

Namesort descending Description
smartcrop_imagecache_actions Implementation of hook_imagecache_actions().
smartcrop_theme Implementation of hook_theme().