You are here

function imagecache_actions_image_load in ImageCache Actions 8

Same name and namespace in other branches
  1. 7 utility.inc \imagecache_actions_image_load()

Loads the given file as an image object.

Parameters

string $file: A file name, with a scheme, relative, or absolute.

bool $toolkit:

Return value

object|FALSE The image object.

See also

imagecache_actions_find_file()

image_load()

4 calls to imagecache_actions_image_load()
canvasactions_canvas2file_dimensions in canvasactions/canvasactions.inc
Image dimensions callback for the underlay (background) effect.
canvasactions_canvas2file_effect in canvasactions/canvasactions.inc
Image effect callback for the underlay (background) effect.
canvasactions_file2canvas_effect in canvasactions/canvasactions.inc
Image effect callback for the overlay (watermark) image effect.
canvasactions_imagemask_effect in canvasactions/canvasactions.inc
Image effect callback for the image mask effect.

File

./utility.inc, line 101
utility.inc: uitility form, conversion and rendering functions for image processing.

Code

function imagecache_actions_image_load($file, $toolkit = FALSE) {
  $full_path = imagecache_actions_find_file($file);
  if (!$full_path) {
    trigger_error("Failed to find file {$file}.", E_USER_ERROR);
    return FALSE;
  }
  $image = image_load($full_path, $toolkit);
  if (!$image) {
    trigger_error("Failed to open file '{$file}' as an image resource.", E_USER_ERROR);
  }
  return $image;
}