SproutCMS

This is the code documentation for the SproutCMS project

function createSize()

Create a resized version of the specified file at a given size.

The size is specified the same as the file/resize method (rXXXxYYY or cXXXxYYY)
The output filename will be basename.size.ext

The files can be used with `size_url` or `get_resize_filename` on the front-end.

Usage

bool File::createSize ( string $filename , string $size [, string $force_ext ] );

Arguments

  1. string $filename
    The original filename
  2. string $size
    The size in on-the-fly resize format
  3. string $force_ext = NULL
    Force a different ext on save, such as jpg for banners

Return value

  • bool
    True on success, false on failure