CI_Image_lib::CI_Image_lib | ( | $ | props = array() |
) |
Constructor
public
string |
CI_Image_lib::clear | ( | ) |
Initialize image properties
Resets values in case this class is used in a loop
public
CI_Image_lib::crop | ( | ) |
Image Crop
This is a wrapper function that chooses the proper cropping function based on the protocol specified
public
CI_Image_lib::display_errors | ( | $ | open = '<p>' , |
|
$ | close = '</p>' | |||
) |
Show error messages
public
string |
CI_Image_lib::explode_name | ( | $ | source_image | ) |
Explode source_image
This is a helper function that extracts the extension from the source_image. This function lets us deal with source_images with multiple periods, like: my.cool.jpg It returns an associative array with two elements: $array['ext'] = '.jpg'; $array['name'] = 'my.cool';
public
array |
CI_Image_lib::gd_loaded | ( | ) |
Is GD Installed?
public
CI_Image_lib::gd_version | ( | ) |
Get GD version
public
CI_Image_lib::get_image_properties | ( | $ | path = '' , |
|
$ | return = FALSE | |||
) |
Get image properties
A helper function that gets info about the file
public
string |
CI_Image_lib::image_create_gd | ( | $ | path = '' , |
|
$ | image_type = '' | |||
) |
Create Image - GD
This simply creates an image resource handle based on the type of image being processed
public
string |
CI_Image_lib::image_display_gd | ( | $ | resource | ) |
Dynamically outputs an image
public
resource |
CI_Image_lib::image_mirror_gd | ( | ) |
Create Mirror Image using GD
This function will flip horizontal or vertical
public
CI_Image_lib::image_process_gd | ( | $ | action = 'resize' |
) |
Image Process Using GD/GD2
This function will resize or crop
public
string |
CI_Image_lib::image_process_imagemagick | ( | $ | action = 'resize' |
) |
Image Process Using ImageMagick
This function will resize, crop or rotate
public
string |
CI_Image_lib::image_process_netpbm | ( | $ | action = 'resize' |
) |
Image Process Using NetPBM
This function will resize, crop or rotate
public
string |
CI_Image_lib::image_reproportion | ( | ) |
Re-proportion Image Width/Height
When creating thumbs, the desired width/height can end up warping the image due to an incorrect ratio between the full-sized image and the thumb.
This function lets us re-proportion the width/height if users choose to maintain the aspect ratio when resizing.
public
CI_Image_lib::image_rotate_gd | ( | ) |
Image Rotate Using GD
public
CI_Image_lib::image_save_gd | ( | $ | resource | ) |
Write image file to disk - GD
Takes an image resource as input and writes the file to the specified destination
public
resource |
CI_Image_lib::initialize | ( | $ | props = array() |
) |
initialize image preferences
public
array |
CI_Image_lib::overlay_watermark | ( | ) |
Watermark - Graphic Version
public
CI_Image_lib::resize | ( | ) |
Image Resize
This is a wrapper function that chooses the proper resize function based on the protocol specified
public
CI_Image_lib::rotate | ( | ) |
Image Rotate
This is a wrapper function that chooses the proper rotation function based on the protocol specified
public
CI_Image_lib::set_error | ( | $ | msg | ) |
Set error message
public
string |
CI_Image_lib::size_calculator | ( | $ | vals | ) |
Size calculator
This function takes a known width x height and recalculates it to a new size. Only one new variable needs to be known
$props = array( 'width' => $width, 'height' => $height, 'new_width' => 40, 'new_height' => '' );
public
array |
CI_Image_lib::text_watermark | ( | ) |
Watermark - Text Version
public
CI_Image_lib::watermark | ( | ) |
Image Watermark
This is a wrapper function that chooses the type of watermarking based on the specified preference.
public
string |
CI_Image_lib::$copy_fnc = 'imagecopyresampled' |
CI_Image_lib::$create_fnc = 'imagecreatetruecolor' |
CI_Image_lib::$create_thumb = FALSE |
CI_Image_lib::$dest_folder = '' |
CI_Image_lib::$dynamic_output = FALSE |
CI_Image_lib::$error_msg = array() |
CI_Image_lib::$full_dst_path = '' |
CI_Image_lib::$full_src_path = '' |
CI_Image_lib::$height = '' |
CI_Image_lib::$image_library = 'gd2' |
CI_Image_lib::$image_type = '' |
CI_Image_lib::$library_path = '' |
CI_Image_lib::$maintain_ratio = TRUE |
CI_Image_lib::$master_dim = 'auto' |
CI_Image_lib::$mime_type = '' |
CI_Image_lib::$new_image = '' |
CI_Image_lib::$orig_height = '' |
CI_Image_lib::$orig_width = '' |
CI_Image_lib::$quality = '90' |
CI_Image_lib::$rotation_angle = '' |
CI_Image_lib::$size_str = '' |
CI_Image_lib::$source_folder = '' |
CI_Image_lib::$source_image = '' |
CI_Image_lib::$thumb_marker = '_thumb' |
CI_Image_lib::$width = '' |
CI_Image_lib::$wm_font_color = '#ffffff' |
CI_Image_lib::$wm_font_path = '' |
CI_Image_lib::$wm_font_size = 17 |
CI_Image_lib::$wm_hor_alignment = 'C' |
CI_Image_lib::$wm_hor_offset = 0 |
CI_Image_lib::$wm_opacity = 50 |
CI_Image_lib::$wm_overlay_path = '' |
CI_Image_lib::$wm_padding = 0 |
CI_Image_lib::$wm_shadow_color = '' |
CI_Image_lib::$wm_shadow_distance = 2 |
CI_Image_lib::$wm_text = '' |
CI_Image_lib::$wm_type = 'text' |
CI_Image_lib::$wm_use_drop_shadow = FALSE |
CI_Image_lib::$wm_use_truetype = FALSE |
CI_Image_lib::$wm_vrt_alignment = 'B' |
CI_Image_lib::$wm_vrt_offset = 0 |
CI_Image_lib::$wm_x_transp = 4 |
CI_Image_lib::$wm_y_transp = 4 |
CI_Image_lib::$x_axis = '' |
CI_Image_lib::$y_axis = '' |