Function __global->_convert_image

Definitions

sources/images2.php

  • (Helper for convert_image / convert_image_plus).
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: string

Parameters

Name Type Default Set Range Description
$from string required parameter N/A N/A The URL to the image to resize. May be either relative or absolute. If $using_path is set it is actually a path
$to PATH required parameter N/A N/A The file path (including filename) to where the resized image will be saved. May be changed by reference if it cannot save an image of the requested file type for some reason
$width ?integer required parameter N/A N/A The maximum width we want our new image to be (null: don't factor this in)
$height ?integer required parameter N/A N/A The maximum height we want our new image to be (null: don't factor this in)
$box_size ?integer Null N/A N/A This is only considered if both $width and $height are null. If set, it will fit the image to a box of this dimension (suited for resizing both landscape and portraits fairly) (null: use width or height)
$exit_on_error boolean True N/A N/A Whether to exit the software if an error occurs
$ext2 ?string Null N/A N/A The file extension representing the file type to save with (null: same as our input file)
$using_path boolean False N/A N/A Whether $from was in fact a path, not a URL
$only_make_smaller boolean False N/A N/A Whether to apply a 'never make the image bigger' rule for thumbnail creation (would affect very small images). Parameter is ignored for some $thumb_options combinations.
$thumb_options ?array Null N/A N/A This optional parameter allows us to specify cropping or padding for the image. See comments in the function. (null: no details passed)

Return

  • The thumbnail URL (blank: URL is outside of base URL)
  • Type: URLPATH
  • Set: N/A
  • Range: N/A