/ImageProcessing.func.php

Description

A set of basic functions for processing uploaded images.

  • author: Richard Sharp
  • version: 2.0
  • copyright: 2005
Functions
getImageInfo (line 15)

Returns information about the image in an associative array.

  • return: Returns an array of information on success (type, width, height), false on failure.
mixed getImageInfo (string $sFile)
  • string $sFile: The full path to the image file.
resizeImage (line 42)

Creates a resized copy of an image file. Either the new height, the new width, or both can be provided. If only one is provided, the other is adjusted proportionately.

  • return: The image type (extension) of the newly created/copied image. False on error.
mixed resizeImage (string $sSourceFilename, string $sDestinationFilename, [int $iTargetHeight = 0], [int $iTargetWidth = 0], [string $sOriginalFilename = ""], [string $sWatermarkImage = ""])
  • string $sSourceFilename: The source file.
  • string $sDestinationFilename: The filename for the new image file that will be created. This should not include any extension.
  • int $iTargetHeight: The new height of the image.
  • int $iTargetWidth: The new width of the image.
  • string $sOriginalFilename: The filename of the original image file. (If uploaded)
  • string $sWatermarkImage: If set, a watermark will be placed on this image. This paramter is the full path to the watermark image. Must be a PNG file. The watermark should be in the lower-right of the image.