b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (Version 2.4) [ class tree: evocore ] [ index: evocore ] [ all elements ]

Procedural File: _image.funcs.php

Source Location: /blogs/inc/files/model/_image.funcs.php

Page Details

This file implements various Image File handling functions.

This file is part of the evoCore framework - http://evocore.net/ See also http://sourceforge.net/projects/evocms/.

Author:  fplanque: Francois PLANQUE.
Version:  $Id: _image.funcs.php,v 1.3.2.2 2009/01/13 00:02:45 fplanque Exp $
Copyright:  

(c)2003-2008 by Francois PLANQUE - http://fplanque.net/

Filesource:  Source Code for this file
Functions
fit_into_constraint  [line 67]

void fit_into_constraint( integer $src_width, integer $src_height, integer $max_width, integer $max_height  )

Scale dimensions to fit into a constrained size, while preserving aspect ratio.

The scaling only happens if the source is larger than the constraint.

Parameters:
integer   $src_width:  source width
integer   $src_height:  source height
integer   $max_width:  constrained width
integer   $max_height:  constrained height


[ Top ]
generate_thumb  [line 206]

array generate_thumb( $src_imh, $thumb_width, $thumb_height  )

Generate a thumbnail

Parameters:
   $src_imh: 
   $thumb_width: 
   $thumb_height: 

API Tags:
Return:  short error code + dest image handler


[ Top ]
load_image  [line 85]

array load_image( string $path, string $mimetype  )

Load an image from a file into memory

Parameters:
string   $path:  pathname of image file
string   $mimetype: 

API Tags:
Return:  resource image handle or NULL


[ Top ]
output_image  [line 173]

string output_image( resource $imh, string $mimetype  )

Output an image from memory to web client

Parameters:
resource   $imh:  image handle
string   $mimetype: 


[ Top ]
save_image  [line 127]

string save_image( resource $imh, string $path, string $mimetype, [integer $quality = 90], [string $chmod = NULL]  )

Output an image from memory to web client

Parameters:
resource   $imh:  image handle
string   $path:  pathname of image file
string   $mimetype: 
integer   $quality: 
string   $chmod:  permissions


[ Top ]
scale_to_constraint  [line 40]

void scale_to_constraint( integer $src_width, integer $src_height, integer $max_width, integer $max_height  )

Scale dimensions to fit into a constrained size, while preserving aspect ratio.

Parameters:
integer   $src_width:  source width
integer   $src_height:  source height
integer   $max_width:  constrained width
integer   $max_height:  constrained height


[ Top ]


Documentation generated on Sat, 06 Mar 2010 03:34:59 +0100 by phpDocumentor 1.4.2. This site is hosted and maintained by Daniel HAHLER (Contact).