[ Index ]

PHP Cross Reference of MyBB 1.8.38

title

Body

[close]

/inc/ -> functions_image.php (summary)

MyBB 1.8 Copyright 2014 MyBB Group, All Rights Reserved Website: http://www.mybb.com License: http://www.mybb.com/about/license

File Size: 260 lines (6 kb)
Included or required: 6 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 functions

  generate_thumbnail()
  check_thumbnail_memory()
  scale_image()

Functions
Functions that are not part of a class:

generate_thumbnail($file, $path, $filename, $maxheight, $maxwidth)   X-Ref
Generates a thumbnail based on specified dimensions (supports png, jpg, and gif)
return: array thumbnail on success, error code 4 on failure
param: string $file the full path to the original image
param: string $path the directory path to where to save the new image
param: string $filename the filename to save the new image as
param: integer $maxheight maximum hight dimension
param: integer $maxwidth maximum width dimension

check_thumbnail_memory($width, $height, $type, $bitdepth, $channels)   X-Ref
Attempts to allocate enough memory to generate the thumbnail
return: bool
param: integer $width width dimension
param: integer $height height dimension
param: string $type one of the IMAGETYPE_XXX constants indicating the type of the image
param: string $bitdepth the bits area the number of bits for each color
param: string $channels the channels - 3 for RGB pictures and 4 for CMYK pictures

scale_image($width, $height, $maxwidth, $maxheight)   X-Ref
Figures out the correct dimensions to use
return: array correct height & width
param: integer $width current width dimension
param: integer $height current height dimension
param: integer $maxwidth max width dimension
param: integer $maxheight max height dimension



2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup Cross-referenced by PHPXref