|
38 | 38 | */
|
39 | 39 | class CI_Image_lib {
|
40 | 40 |
|
41 |
| - var $image_library = 'gd2'; // Can be: imagemagick, netpbm, gd, gd2 |
42 |
| - var $library_path = ''; |
43 |
| - var $dynamic_output = FALSE; // Whether to send to browser or write to disk |
44 |
| - var $source_image = ''; |
45 |
| - var $new_image = ''; |
46 |
| - var $width = ''; |
47 |
| - var $height = ''; |
48 |
| - var $quality = '90'; |
49 |
| - var $create_thumb = FALSE; |
50 |
| - var $thumb_marker = '_thumb'; |
51 |
| - var $maintain_ratio = TRUE; // Whether to maintain aspect ratio when resizing or use hard values |
52 |
| - var $master_dim = 'auto'; // auto, height, or width. Determines what to use as the master dimension |
53 |
| - var $rotation_angle = ''; |
54 |
| - var $x_axis = ''; |
55 |
| - var $y_axis = ''; |
| 41 | + public $image_library = 'gd2'; // Can be: imagemagick, netpbm, gd, gd2 |
| 42 | + public $library_path = ''; |
| 43 | + public $dynamic_output = FALSE; // Whether to send to browser or write to disk |
| 44 | + public $source_image = ''; |
| 45 | + public $new_image = ''; |
| 46 | + public $width = ''; |
| 47 | + public $height = ''; |
| 48 | + public $quality = '90'; |
| 49 | + public $create_thumb = FALSE; |
| 50 | + public $thumb_marker = '_thumb'; |
| 51 | + public $maintain_ratio = TRUE; // Whether to maintain aspect ratio when resizing or use hard values |
| 52 | + public $master_dim = 'auto'; // auto, height, or width. Determines what to use as the master dimension |
| 53 | + public $rotation_angle = ''; |
| 54 | + public $x_axis = ''; |
| 55 | + public $y_axis = ''; |
56 | 56 |
|
57 | 57 | // Watermark Vars
|
58 |
| - var $wm_text = ''; // Watermark text if graphic is not used |
59 |
| - var $wm_type = 'text'; // Type of watermarking. Options: text/overlay |
60 |
| - var $wm_x_transp = 4; |
61 |
| - var $wm_y_transp = 4; |
62 |
| - var $wm_overlay_path = ''; // Watermark image path |
63 |
| - var $wm_font_path = ''; // TT font |
64 |
| - var $wm_font_size = 17; // Font size (different versions of GD will either use points or pixels) |
65 |
| - var $wm_vrt_alignment = 'B'; // Vertical alignment: T M B |
66 |
| - var $wm_hor_alignment = 'C'; // Horizontal alignment: L R C |
67 |
| - var $wm_padding = 0; // Padding around text |
68 |
| - var $wm_hor_offset = 0; // Lets you push text to the right |
69 |
| - var $wm_vrt_offset = 0; // Lets you push text down |
70 |
| - var $wm_font_color = '#ffffff'; // Text color |
71 |
| - var $wm_shadow_color = ''; // Dropshadow color |
72 |
| - var $wm_shadow_distance = 2; // Dropshadow distance |
73 |
| - var $wm_opacity = 50; // Image opacity: 1 - 100 Only works with image |
| 58 | + public $wm_text = ''; // Watermark text if graphic is not used |
| 59 | + public $wm_type = 'text'; // Type of watermarking. Options: text/overlay |
| 60 | + public $wm_x_transp = 4; |
| 61 | + public $wm_y_transp = 4; |
| 62 | + public $wm_overlay_path = ''; // Watermark image path |
| 63 | + public $wm_font_path = ''; // TT font |
| 64 | + public $wm_font_size = 17; // Font size (different versions of GD will either use points or pixels) |
| 65 | + public $wm_vrt_alignment = 'B'; // Vertical alignment: T M B |
| 66 | + public $wm_hor_alignment = 'C'; // Horizontal alignment: L R C |
| 67 | + public $wm_padding = 0; // Padding around text |
| 68 | + public $wm_hor_offset = 0; // Lets you push text to the right |
| 69 | + public $wm_vrt_offset = 0; // Lets you push text down |
| 70 | + public $wm_font_color = '#ffffff'; // Text color |
| 71 | + public $wm_shadow_color = ''; // Dropshadow color |
| 72 | + public $wm_shadow_distance = 2; // Dropshadow distance |
| 73 | + public $wm_opacity = 50; // Image opacity: 1 - 100 Only works with image |
74 | 74 |
|
75 | 75 | // Private Vars
|
76 |
| - var $source_folder = ''; |
77 |
| - var $dest_folder = ''; |
78 |
| - var $mime_type = ''; |
79 |
| - var $orig_width = ''; |
80 |
| - var $orig_height = ''; |
81 |
| - var $image_type = ''; |
82 |
| - var $size_str = ''; |
83 |
| - var $full_src_path = ''; |
84 |
| - var $full_dst_path = ''; |
85 |
| - var $create_fnc = 'imagecreatetruecolor'; |
86 |
| - var $copy_fnc = 'imagecopyresampled'; |
87 |
| - var $error_msg = array(); |
88 |
| - var $wm_use_drop_shadow = FALSE; |
89 |
| - var $wm_use_truetype = FALSE; |
| 76 | + public $source_folder = ''; |
| 77 | + public $dest_folder = ''; |
| 78 | + public $mime_type = ''; |
| 79 | + public $orig_width = ''; |
| 80 | + public $orig_height = ''; |
| 81 | + public $image_type = ''; |
| 82 | + public $size_str = ''; |
| 83 | + public $full_src_path = ''; |
| 84 | + public $full_dst_path = ''; |
| 85 | + public $create_fnc = 'imagecreatetruecolor'; |
| 86 | + public $copy_fnc = 'imagecopyresampled'; |
| 87 | + public $error_msg = array(); |
| 88 | + public $wm_use_drop_shadow = FALSE; |
| 89 | + public $wm_use_truetype = FALSE; |
90 | 90 |
|
91 | 91 | /**
|
92 | 92 | * Constructor
|
|
0 commit comments