tangra logo
   
[ class tree: tangra_lib ] [ index: tangra_lib ] [ all elements ]
 

Procedural File: image_manipulation_functions.inc.php

Source Location: /misc/image_manipulation_functions.inc.php

Page Details

Contains various functions for manipulating images

Filesource:  Source Code for this file
Functions
tangra_create_image_resource_from_file  [line 155]

unknown tangra_create_image_resource_from_file( string $image_file  )

Creates image resource from image file

Detects the image format and returns image resource. On error returns &false;

Parameters:
string   $image_file:  Path to image file.


[ Top ]
tangra_image_resize_to_fixed_size_no_stretch  [line 76]

resource tangra_image_resize_to_fixed_size_no_stretch( resource $source_img_rsrc, integet $dest_size_x, integet $dest_size_y, [boolean $center_size_x = true], [boolean $center_size_y = true], [integet $bg_red = 255], [integet $bg_green = 255], [integet $bg_blue = 255]  )

Resizes image to given size. If ratio is different - paddes the image with background

Parameters:
resource   $source_img_rsrc:  An image resource, returned by one of the image creation functions, such as imagecreatetruecolor().
integet   $dest_size_x:  New width
integet   $dest_size_y:  New height
boolean   $center_size_x:  If true image is centered horizontally
boolean   $center_size_y:  If true image is centered vertiaclaly
integet   $bg_red:  Background color red component 0-255
integet   $bg_green:  Background color green component 0-255
integet   $bg_blue:  Background color blue component 0-255

API Tags:
Return:  Image resource


[ Top ]
tangra_image_resize_to_max_x_or_y  [line 20]

resource tangra_image_resize_to_max_x_or_y( resource $source_img_rsrc, integer $dest_size_x, integer $dest_size_y  )

Resizes image to maximum width or height, keeping the x/y ratio

Parameters:
resource   $source_img_rsrc:  An image resource, returned by one of the image creation functions, such as imagecreatetruecolor().
integer   $dest_size_x:  Max width of the new image
integer   $dest_size_y:  Max height of the new image

API Tags:
Return:  Image resource


[ Top ]