summaryrefslogtreecommitdiffstats
path: root/system/libraries/Image_lib.php
diff options
context:
space:
mode:
authorEric Barnes <eric@ericlbarnes.com>2011-12-06 04:05:38 +0100
committerEric Barnes <eric@ericlbarnes.com>2011-12-06 04:05:38 +0100
commitb1673360a95a1298488979459587517691d3a703 (patch)
tree3341a3b19020cf97af8b4e3a8f1ef108e3912e31 /system/libraries/Image_lib.php
parent5d4da1bae6f00a193db06e940cd59ebf9743b615 (diff)
parent319cf4d4d9897a929d6d58ad1a29bcc4a85a0b42 (diff)
Merge branch 'develop' of https://github.com/michaeljdennis/CodeIgniter into michaeljdennis-develop
Conflicts: system/libraries/Image_lib.php user_guide/changelog.html
Diffstat (limited to 'system/libraries/Image_lib.php')
-rw-r--r--system/libraries/Image_lib.php41
1 files changed, 30 insertions, 11 deletions
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index ceb31d1f0..2ed488c7e 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -5,9 +5,9 @@
* An open source application development framework for PHP 5.1.6 or newer
*
* NOTICE OF LICENSE
- *
+ *
* Licensed under the Open Software License version 3.0
- *
+ *
* This source file is subject to the Open Software License (OSL 3.0) that is
* bundled with this package in the files license.txt / license.rst. It is
* also available through the world wide web at this URL:
@@ -116,18 +116,37 @@ class CI_Image_lib {
*/
function clear()
{
- $props = array('source_folder', 'dest_folder', 'source_image', 'full_src_path', 'full_dst_path', 'new_image', 'image_type', 'size_str', 'quality', 'orig_width', 'orig_height', 'rotation_angle', 'x_axis', 'y_axis', 'create_fnc', 'copy_fnc', 'wm_overlay_path', 'wm_use_truetype', 'dynamic_output', 'wm_font_size', 'wm_text', 'wm_vrt_alignment', 'wm_hor_alignment', 'wm_padding', 'wm_hor_offset', 'wm_vrt_offset', 'wm_font_color', 'wm_use_drop_shadow', 'wm_shadow_color', 'wm_shadow_distance', 'wm_opacity', 'width', 'height');
+ $props = array('library_path', 'source_image', 'new_image', 'width', 'height', 'rotation_angle', 'x_axis', 'y_axis', 'wm_text', 'wm_overlay_path', 'wm_font_path', 'wm_shadow_color', 'source_folder', 'dest_folder', 'mime_type', 'orig_width', 'orig_height', 'image_type', 'size_str', 'full_src_path', 'full_dst_path');
foreach ($props as $val)
{
$this->$val = '';
}
- // special consideration for master_dim
- $this->master_dim = 'auto';
-
- // special consideration for create_thumb
- $this->create_thumb = FALSE;
+ $this->image_library = 'gd2';
+ $this->dynamic_output = FALSE;
+ $this->quality = '90';
+ $this->create_thumb = FALSE;
+ $this->thumb_marker = '_thumb';
+ $this->maintain_ratio = TRUE;
+ $this->master_dim = 'auto';
+ $this->wm_type = 'text';
+ $this->wm_x_transp = 4;
+ $this->wm_y_transp = 4;
+ $this->wm_font_size = 17;
+ $this->wm_vrt_alignment = 'B';
+ $this->wm_hor_alignment = 'C';
+ $this->wm_padding = 0;
+ $this->wm_hor_offset = 0;
+ $this->wm_vrt_offset = 0;
+ $this->wm_font_color = '#ffffff';
+ $this->wm_shadow_distance = 2;
+ $this->wm_opacity = 50;
+ $this->create_fnc = 'imagecreatetruecolor';
+ $this->copy_fnc = 'imagecopyresampled';
+ $this->error_msg = array();
+ $this->wm_use_drop_shadow = FALSE;
+ $this->wm_use_truetype = FALSE;
}
// --------------------------------------------------------------------
@@ -161,7 +180,7 @@ class CI_Image_lib {
if ($this->source_image == '')
{
$this->set_error('imglib_source_image_required');
- return FALSE;
+ return FALSE;
}
/*
@@ -204,7 +223,7 @@ class CI_Image_lib {
// Set the Image Properties
if ( ! $this->get_image_properties($this->source_folder.$this->source_image))
{
- return FALSE;
+ return FALSE;
}
/*
@@ -414,7 +433,7 @@ class CI_Image_lib {
if ($this->rotation_angle == '' OR ! in_array($this->rotation_angle, $degs))
{
$this->set_error('imglib_rotation_angle_required');
- return FALSE;
+ return FALSE;
}
// Reassign the width and height