Index

(image)

o2img_thumbnail

boolean o2img_thumbnail(string $source_file, string $target_file, integer $width, integer $height, boolean $ratio)

Creates a thumbnail for a given source image file.
When $ratio is FALSE thumbnail image will stratch to fit width and height.
When $ratio is TRUE humbnail image will maintain aspect ratio to fit width or height without stratching.
Supported image formats are PNG, GIF and JPG.


Parameters:
  1. $source_file
  2. Source image file to be thumbnailed
  3. $target_file
  4. Target image file to be created
  5. $width
  6. Thumbnail width
  7. $height
  8. Thumbnail height
  9. $ratio
  10. If TRUE thumbnail will maintain source aspect ratio