?
Path : /home/admin/public_html/old/membershop/class/sources/ |
Current File : /home/admin/public_html/old/membershop/class/sources/class.upload.html |
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- template designed by Marco Von Ballmoos --> <title>Docs For Class upload</title> <link rel="stylesheet" href="phpdoc/stylesheet.css" /> <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> </head> <body> <div class="page-body"> <h2 class="class-name">class.upload.php</h2> <div class="info-box"> <div class="info-box-body"> <!-- ========== Info from phpDoc block ========= --> <ul class="tags"> <li><span class="field">filesource:</span> <a href="class.upload.php.html">Source Code for this file</a></li> <li><span class="field">url:</span> <a href="http://www.verot.net/php_class_upload.htm">http://www.verot.net/php_class_upload.htm</a></li> <li><span class="field">copyright:</span> Colin Verot</li> <li><span class="field">license:</span> <a href="http://opensource.org/licenses/gpl-license.php">GNU Public License version 2</a></li> <li><span class="field">author:</span> Colin Verot <<a href="mailto:colin@verot.net">colin@verot.net</a>></li> <li><span class="field">version:</span> 0.29 </li> </ul> </div> </div> <a name="sec-description"></a> <div class="info-box"> <div class="info-box-title">Description</div> <div class="nav-bar"> <span class="disabled">Description</span> | <a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>) | <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>) </div> <div class="info-box-body"> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Class upload</p> <p class="description"><p><strong>What does it do?</strong></p><p>It manages file uploads for you. In short, it manages the uploaded file, and allows you to do whatever you want with the file, especially if it is an image, and as many times as you want.</p><p>It is the ideal class to quickly integrate file upload in your site. If the file is an image, you can convert, resize, crop it in many ways. You can also apply filters, add borders, text, watermarks, etc... That's all you need for a gallery script for instance. Supported formats are PNG, JPG, GIF and BMP.</p><p>You can also use the class to work on local files, which is especially useful to use the image manipulation features. The class also supports Flash uploaders.</p><p>The class works with PHP 4 and 5, and its error messages can be localized at will.</p><p><strong>How does it work?</strong></p><p>You instanciate the class with the $_FILES['my_field'] array where my_field is the field name from your upload form. The class will check if the original file has been uploaded to its temporary location (alternatively, you can instanciate the class with a local filename).</p><p>You can then set a number of processing variables to act on the file. For instance, you can rename the file, and if it is an image, convert and resize it in many ways. You can also set what will the class do if the file already exists.</p><p>Then you call the function <a href="#methodprocess">process</a> to actually perform the actions according to the processing parameters you set above. It will create new instances of the original file, so the original file remains the same between each process. The file will be manipulated, and copied to the given location. The processing variables will be reset once it is done.</p><p>You can repeat setting up a new set of processing variables, and calling <a href="#methodprocess">process</a> again as many times as you want. When you have finished, you can call <a href="#methodclean">clean</a> to delete the original uploaded file.</p><p>If you don't set any processing parameters and call <a href="#methodprocess">process</a> just after instanciating the class. The uploaded file will be simply copied to the given location without any alteration or checks.</p><p>Don't forget to add <em>enctype="multipart/form-data"</em> in your form tag <form> if you want your form to upload the file.</p><p><strong>How to use it?</strong><br /> Create a simple HTML file, with a form such as: <pre> <form enctype="multipart/form-data" method="post" action="upload.php"> <input type="file" size="32" name="image_field" value=""> <input type="submit" name="Submit" value="upload"> </form></pre> Create a file called upload.php: <pre> $handle = new upload($_FILES['image_field']); if ($handle->uploaded) { $handle->file_new_name_body = 'image_resized'; $handle->image_resize = true; $handle->image_x = 100; $handle->image_ratio_y = true; $handle->process('/home/user/files/'); if ($handle->processed) { echo 'image resized'; $handle->clean(); } else { echo 'error : ' . $handle->error; } }</pre></p><p><strong>How to process local files?</strong><br /> Use the class as following, the rest being the same as above: <pre> $handle = new upload('/home/user/myfile.jpg');</pre></p><p><strong>How to set the language?</strong><br /> Instantiate the class with a second argument being the language code: <pre> $handle = new upload($_FILES['image_field'], 'fr_FR'); $handle = new upload('/home/user/myfile.jpg', 'fr_FR');</pre></p><p><strong>How to output the resulting file or picture directly to the browser?</strong><br /> Simply call <a href="#methodprocess">process</a>() without an argument (or with null as first argument): <pre> $handle = new upload($_FILES['image_field']); header('Content-type: ' . $handle->file_src_mime); echo $handle->Process(); die();</pre> Or if you want to force the download of the file: <pre> $handle = new upload($_FILES['image_field']); header('Content-type: ' . $handle->file_src_mime); header("Content-Disposition: attachment; filename=".rawurlencode($handle->file_src_name).";"); echo $handle->Process(); die();</pre></p><p><strong>Processing parameters</strong> (reset after each process) <ul><li><strong>file_new_name_body</strong> replaces the name body (default: '')<br /> <pre>$handle->file_new_name_body = 'new name';</pre></li><li><strong>file_name_body_add</strong> appends to the name body (default: '')<br /> <pre>$handle->file_name_body_add = '_uploaded';</pre></li><li><strong>file_name_body_pre</strong> prepends to the name body (default: '')<br /> <pre>$handle->file_name_body_pre = 'thumb_';</pre></li><li><strong>file_new_name_ext</strong> replaces the file extension (default: '')<br /> <pre>$handle->file_new_name_ext = 'txt';</pre></li><li><strong>file_safe_name</strong> formats the filename (spaces changed to _) (default: true)<br /> <pre>$handle->file_safe_name = true;</pre></li><li><strong>file_overwrite</strong> sets behaviour if file already exists (default: false)<br /> <pre>$handle->file_overwrite = true;</pre></li><li><strong>file_auto_rename</strong> automatically renames file if it already exists (default: true)<br /> <pre>$handle->file_auto_rename = true;</pre></li><li><strong>auto_create_dir</strong> automatically creates destination directory if missing (default: true)<br /> <pre>$handle->auto_create_dir = true;</pre></li><li><strong>dir_auto_chmod</strong> automatically attempts to chmod the destination directory if not writeable (default: true)<br /> <pre>$handle->dir_auto_chmod = true;</pre></li><li><strong>dir_chmod</strong> chmod used when creating directory or if directory not writeable (default: 0777)<br /> <pre>$handle->dir_chmod = 0777;</pre></li><li><strong>file_max_size</strong> sets maximum upload size (default: upload_max_filesize from php.ini)<br /> <pre>$handle->file_max_size = '1024'; // 1KB</pre></li><li><strong>mime_check</strong> sets if the class check the MIME against the <a href="#var$allowed">allowed</a> list (default: true)<br /> <pre>$handle->mime_check = true;</pre></li><li><strong>no_script</strong> sets if the class turns scripts into text files (default: true)<br /> <pre>$handle->no_script = false;</pre></li><li><strong>allowed</strong> array of allowed mime-types. wildcard accepted, as in image/* (default: check Init)<br /> <pre>$handle->allowed = array('application/pdf','application/msword', 'image/*');</pre></li><li><strong>forbidden</strong> array of forbidden mime-types. wildcard accepted, as in image/* (default: check Init)<br /> <pre>$handle->forbidden = array('application/*');</pre></li></ul> <ul><li><strong>image_convert</strong> if set, image will be converted (possible values : ''|'png'|'jpeg'|'gif'|'bmp'; default: '')<br /> <pre>$handle->image_convert = 'jpg';</pre></li><li><strong>image_background_color</strong> if set, will forcibly fill transparent areas with the color, in hexadecimal (default: null)<br /> <pre>$handle->image_background_color = '#FF00FF';</pre></li><li><strong>image_default_color</strong> fallback color background color for non alpha-transparent output formats, such as JPEG or BMP, in hexadecimal (default: #FFFFFF)<br /> <pre>$handle->image_default_color = '#FF00FF';</pre></li><li><strong>jpeg_quality</strong> sets the compression quality for JPEG images (default: 85)<br /> <pre>$handle->jpeg_quality = 50;</pre></li><li><strong>jpeg_size</strong> if set to a size in bytes, will approximate <a href="#var$jpeg_quality">jpeg_quality</a> so the output image fits within the size (default: null)<br /> <pre>$handle->jpeg_size = 3072;</pre></li></ul> The following eight settings can be used to invalidate an upload if the file is an image (note that <em>open_basedir</em> restrictions prevent the use of these settings) <ul><li><strong>image_max_width</strong> if set to a dimension in pixels, the upload will be invalid if the image width is greater (default: null)<br /> <pre>$handle->image_max_width = 200;</pre></li><li><strong>image_max_height</strong> if set to a dimension in pixels, the upload will be invalid if the image height is greater (default: null)<br /> <pre>$handle->image_max_height = 100;</pre></li><li><strong>image_max_pixels</strong> if set to a number of pixels, the upload will be invalid if the image number of pixels is greater (default: null)<br /> <pre>$handle->image_max_pixels = 50000;</pre></li><li><strong>image_max_ratio</strong> if set to a aspect ratio (width/height), the upload will be invalid if the image apect ratio is greater (default: null)<br /> <pre>$handle->image_max_ratio = 1.5;</pre></li><li><strong>image_min_width</strong> if set to a dimension in pixels, the upload will be invalid if the image width is lower (default: null)<br /> <pre>$handle->image_min_width = 100;</pre></li><li><strong>image_min_height</strong> if set to a dimension in pixels, the upload will be invalid if the image height is lower (default: null)<br /> <pre>$handle->image_min_height = 500;</pre></li><li><strong>image_min_pixels</strong> if set to a number of pixels, the upload will be invalid if the image number of pixels is lower (default: null)<br /> <pre>$handle->image_min_pixels = 20000;</pre></li><li><strong>image_min_ratio</strong> if set to a aspect ratio (width/height), the upload will be invalid if the image apect ratio is lower (default: null)<br /> <pre>$handle->image_min_ratio = 0.5;</pre></li></ul> <ul><li><strong>image_resize</strong> determines is an image will be resized (default: false)<br /> <pre>$handle->image_resize = true;</pre></li></ul> The following variables are used only if <a href="#var$image_resize">image_resize</a> == true <ul><li><strong>image_x</strong> destination image width (default: 150)<br /> <pre>$handle->image_x = 100;</pre></li><li><strong>image_y</strong> destination image height (default: 150)<br /> <pre>$handle->image_y = 200;</pre></li></ul> Use either one of the following <ul><li><strong>image_ratio</strong> if true, resize image conserving the original sizes ratio, using <a href="#var$image_x">image_x</a> AND <a href="#var$image_y">image_y</a> as max sizes if true (default: false)<br /> <pre>$handle->image_ratio = true;</pre></li><li><strong>image_ratio_crop</strong> if true, resize image conserving the original sizes ratio, using <a href="#var$image_x">image_x</a> AND <a href="#var$image_y">image_y</a> as max sizes, and cropping excedent to fill the space. setting can also be a string, with one or more from 'TBLR', indicating which side of the image will be kept while cropping (default: false)<br /> <pre>$handle->image_ratio_crop = true;</pre></li><li><strong>image_ratio_fill</strong> if true, resize image conserving the original sizes ratio, using <a href="#var$image_x">image_x</a> AND <a href="#var$image_y">image_y</a> as max sizes, fitting the image in the space and coloring the remaining space. setting can also be a string, with one or more from 'TBLR', indicating which side of the space the image will be in (default: false)<br /> <pre>$handle->image_ratio_fill = true;</pre></li><li><strong>image_ratio_no_zoom_in</strong> same as <a href="#var$image_ratio">image_ratio</a>, but won't resize if the source image is smaller than <a href="#var$image_x">image_x</a> x <a href="#var$image_y">image_y</a> (default: false)<br /> <pre>$handle->image_ratio_no_zoom_in = true;</pre></li><li><strong>image_ratio_no_zoom_out</strong> same as <a href="#var$image_ratio">image_ratio</a>, but won't resize if the source image is bigger than <a href="#var$image_x">image_x</a> x <a href="#var$image_y">image_y</a> (default: false)<br /> <pre>$handle->image_ratio_no_zoom_out = true;</pre></li><li><strong>image_ratio_x</strong> if true, resize image, calculating <a href="#var$image_x">image_x</a> from <a href="#var$image_y">image_y</a> and conserving the original sizes ratio (default: false)<br /> <pre>$handle->image_ratio_x = true;</pre></li><li><strong>image_ratio_y</strong> if true, resize image, calculating <a href="#var$image_y">image_y</a> from <a href="#var$image_x">image_x</a> and conserving the original sizes ratio (default: false)<br /> <pre>$handle->image_ratio_y = true;</pre></li><li><strong>image_ratio_pixels</strong> if set to a long integer, resize image, calculating <a href="#var$image_y">image_y</a> and <a href="#var$image_x">image_x</a> to match a the number of pixels (default: false)<br /> <pre>$handle->image_ratio_pixels = 25000;</pre></li></ul> The following image manipulations require GD2+ <ul><li><strong>image_brightness</strong> if set, corrects the brightness. value between -127 and 127 (default: null)<br /> <pre>$handle->image_brightness = 40;</pre></li><li><strong>image_contrast</strong> if set, corrects the contrast. value between -127 and 127 (default: null)<br /> <pre>$handle->image_contrast = 50;</pre></li><li><strong>image_tint_color</strong> if set, will tint the image with a color, value as hexadecimal #FFFFFF (default: null)<br /> <pre>$handle->image_tint_color = '#FF0000';</pre></li><li><strong>image_overlay_color</strong> if set, will add a colored overlay, value as hexadecimal #FFFFFF (default: null)<br /> <pre>$handle->image_overlay_color = '#FF0000';</pre></li><li><strong>image_overlay_percent</strong> used when <a href="#var$image_overlay_color">image_overlay_color</a> is set, determines the opacity (default: 50)<br /> <pre>$handle->image_overlay_percent = 20;</pre></li><li><strong>image_negative</strong> inverts the colors in the image (default: false)<br /> <pre>$handle->image_negative = true;</pre></li><li><strong>image_greyscale</strong> transforms an image into greyscale (default: false)<br /> <pre>$handle->image_greyscale = true;</pre></li><li><strong>image_threshold</strong> applies a threshold filter. value between -127 and 127 (default: null)<br /> <pre>$handle->image_threshold = 20;</pre></li></ul> <ul><li><strong>image_text</strong> creates a text label on the image, value is a string, with eventual replacement tokens (default: null)<br /> <pre>$handle->image_text = 'test';</pre></li><li><strong>image_text_direction</strong> text label direction, either 'h' horizontal or 'v' vertical (default: 'h')<br /> <pre>$handle->image_text_direction = 'v';</pre></li><li><strong>image_text_color</strong> text color for the text label, in hexadecimal (default: #FFFFFF)<br /> <pre>$handle->image_text_color = '#FF0000';</pre></li><li><strong>image_text_percent</strong> text opacity on the text label, integer between 0 and 100 (default: 100)<br /> <pre>$handle->image_text_percent = 50;</pre></li><li><strong>image_text_background</strong> text label background color, in hexadecimal (default: null)<br /> <pre>$handle->image_text_background = '#FFFFFF';</pre></li><li><strong>image_text_background_percent</strong> text label background opacity, integer between 0 and 100 (default: 100)<br /> <pre>$handle->image_text_background_percent = 50;</pre></li><li><strong>image_text_font</strong> built-in font for the text label, from 1 to 5. 1 is the smallest (default: 5)<br /> <pre>$handle->image_text_font = 4;</pre></li><li><strong>image_text_x</strong> absolute text label position, in pixels from the left border. can be negative (default: null)<br /> <pre>$handle->image_text_x = 5;</pre></li><li><strong>image_text_y</strong> absolute text label position, in pixels from the top border. can be negative (default: null)<br /> <pre>$handle->image_text_y = 5;</pre></li><li><strong>image_text_position</strong> text label position withing the image, a combination of one or two from 'TBLR': top, bottom, left, right (default: null)<br /> <pre>$handle->image_text_position = 'LR';</pre></li><li><strong>image_text_padding</strong> text label padding, in pixels. can be overridden by <a href="#var$image_text_padding_x">image_text_padding_x</a> and <a href="#var$image_text_padding_y">image_text_padding_y</a> (default: 0)<br /> <pre>$handle->image_text_padding = 5;</pre></li><li><strong>image_text_padding_x</strong> text label horizontal padding (default: null)<br /> <pre>$handle->image_text_padding_x = 2;</pre></li><li><strong>image_text_padding_y</strong> text label vertical padding (default: null)<br /> <pre>$handle->image_text_padding_y = 10;</pre></li><li><strong>image_text_alignment</strong> text alignment when text has multiple lines, either 'L', 'C' or 'R' (default: 'C')<br /> <pre>$handle->image_text_alignment = 'R';</pre></li><li><strong>image_text_line_spacing</strong> space between lines in pixels, when text has multiple lines (default: 0)<br /> <pre>$handle->image_text_line_spacing = 3;</pre></li></ul> <ul><li><strong>image_flip</strong> flips image, wither 'h' horizontal or 'v' vertical (default: null)<br /> <pre>$handle->image_flip = 'h';</pre></li><li><strong>image_rotate</strong> rotates image. possible values are 90, 180 and 270 (default: null)<br /> <pre>$handle->image_rotate = 90;</pre></li><li><strong>image_crop</strong> crops image. accepts 4, 2 or 1 values as 'T R B L' or 'TB LR' or 'TBLR'. dimension can be 20, or 20px or 20% (default: null)<br /> <pre>$handle->image_crop = array(50,40,30,20); OR '-20 20%'...</pre></li><li><strong>image_precrop</strong> crops image, before an eventual resizing. accepts 4, 2 or 1 values as 'T R B L' or 'TB LR' or 'TBLR'. dimension can be 20, or 20px or 20% (default: null)<br /> <pre>$handle->image_precrop = array(50,40,30,20); OR '-20 20%'...</pre></li></ul> <ul><li><strong>image_bevel</strong> adds a bevel border to the image. value is thickness in pixels (default: null)<br /> <pre>$handle->image_bevel = 20;</pre></li><li><strong>image_bevel_color1</strong> top and left bevel color, in hexadecimal (default: #FFFFFF)<br /> <pre>$handle->image_bevel_color1 = '#FFFFFF';</pre></li><li><strong>image_bevel_color2</strong> bottom and right bevel color, in hexadecimal (default: #000000)<br /> <pre>$handle->image_bevel_color2 = '#000000';</pre></li><li><strong>image_border</strong> adds a unicolor border to the image. accepts 4, 2 or 1 values as 'T R B L' or 'TB LR' or 'TBLR'. dimension can be 20, or 20px or 20% (default: null)<br /> <pre>$handle->image_border = '3px'; OR '-20 20%' OR array(3,2)...</pre></li><li><strong>image_border_color</strong> border color, in hexadecimal (default: #FFFFFF)<br /> <pre>$handle->image_border_color = '#FFFFFF';</pre></li><li><strong>image_frame</strong> type of frame: 1=flat 2=crossed (default: null)<br /> <pre>$handle->image_frame = 2;</pre></li><li><strong>image_frame_colors</strong> list of hex colors, in an array or a space separated string (default: '#FFFFFF #999999 #666666 #000000')<br /> <pre>$handle->image_frame_colors = array('#999999', '#FF0000', '#666666', '#333333', '#000000');</pre></li></ul> <ul><li><strong>image_watermark</strong> adds a watermark on the image, value is a local filename. accepted files are GIF, JPG, BMP, PNG and PNG alpha (default: null)<br /> <pre>$handle->image_watermark = 'watermark.png';</pre></li><li><strong>image_watermark_x</strong> absolute watermark position, in pixels from the left border. can be negative (default: null)<br /> <pre>$handle->image_watermark_x = 5;</pre></li><li><strong>image_watermark_y</strong> absolute watermark position, in pixels from the top border. can be negative (default: null)<br /> <pre>$handle->image_watermark_y = 5;</pre></li><li><strong>image_watermark_position</strong> watermark position withing the image, a combination of one or two from 'TBLR': top, bottom, left, right (default: null)<br /> <pre>$handle->image_watermark_position = 'LR';</pre></li></ul> <ul><li><strong>image_reflection_height</strong> if set, a reflection will be added. Format is either in pixels or percentage, such as 40, '40', '40px' or '40%' (default: null)<br /> <pre>$handle->image_reflection_height = '25%';</pre></li><li><strong>image_reflection_space</strong> space in pixels between the source image and the reflection, can be negative (default: null)<br /> <pre>$handle->image_reflection_space = 3;</pre></li><li><strong>image_reflection_color</strong> reflection background color, in hexadecimal. Now deprecated in favor of <a href="#var$image_default_color">image_default_color</a> (default: #FFFFFF)<br /> <pre>$handle->image_default_color = '#000000';</pre></li><li><strong>image_reflection_opacity</strong> opacity level at which the reflection starts, integer between 0 and 100 (default: 60)<br /> <pre>$handle->image_reflection_opacity = 60;</pre></li></ul></p><p><strong>Values that can be read before calling <a href="#methodprocess">process</a>()</strong> <ul><li><strong>file_src_name</strong> Source file name</li><li><strong>file_src_name_body</strong> Source file name body</li><li><strong>file_src_name_ext</strong> Source file extension</li><li><strong>file_src_pathname</strong> Source file complete path and name</li><li><strong>file_src_mime</strong> Source file mime type</li><li><strong>file_src_size</strong> Source file size in bytes</li><li><strong>file_src_error</strong> Upload error code</li><li><strong>file_is_image</strong> Boolean flag, true if the file is a supported image type</li></ul> If the file is a supported image type (and <em>open_basedir</em> restrictions allow it) <ul><li><strong>image_src_x</strong> Source file width in pixels</li><li><strong>image_src_y</strong> Source file height in pixels</li><li><strong>image_src_pixels</strong> Source file number of pixels</li><li><strong>image_src_type</strong> Source file type (png, jpg, gif or bmp)</li><li><strong>image_src_bits</strong> Source file color depth</li></ul></p><p><strong>Values that can be read after calling <a href="#methodprocess">process</a>()</strong> <ul><li><strong>file_dst_path</strong> Destination file path</li><li><strong>file_dst_name_body</strong> Destination file name body</li><li><strong>file_dst_name_ext</strong> Destination file extension</li><li><strong>file_dst_name</strong> Destination file name</li><li><strong>file_dst_pathname</strong> Destination file complete path and name</li></ul> If the file is a supported image type <ul><li><strong>image_dst_x</strong> Destination file width</li><li><strong>image_dst_y</strong> Destination file height</li><li><strong>image_convert</strong> Destination file format</li></ul></p><p><strong>Requirements</strong></p><p>Most of the image operations require GD. GD2 is greatly recommended</p><p>The class is compatible with PHP 4.3+, and compatible with PHP5</p><p><strong>Changelog</strong> <ul><li><strong>v 0.29</strong> 03/02/2010<br /> - added protection against malicious images<br /> - added zip and torrent MIME type<br /> - replaced split() with explode()<br /> - initialise image_dst_x/y with image_src_x/y<br /> - removed <a href="#var$mime_fileinfo">mime_fileinfo</a>, <a href="#var$mime_file">mime_file</a>, <a href="#var$mime_magic">mime_magic</a> and <a href="#var$mime_getimagesize">mime_getimagesize</a> from the docs since they are used before <a href="#methodprocess">process</a><br /> - added more extensions and MIME types<br /> - improved MIME type validation<br /> - improved logging</li><li><strong>v 0.28</strong> 10/08/2009<br /> - replaced ereg functions to be compatible with PHP 5.3<br /> - added flv MIME type<br /> - improved MIME type detection<br /> - added <a href="#var$file_name_body_pre">file_name_body_pre</a> to prepend a string to the file name<br /> - added <a href="#var$mime_fileinfo">mime_fileinfo</a>, <a href="#var$mime_file">mime_file</a>, <a href="#var$mime_magic">mime_magic</a> and <a href="#var$mime_getimagesize">mime_getimagesize</a> so that it is possible to deactivate some MIME type checking method<br /> - use exec() rather than shell_exec(), to play better with safe mode <br /> - added some error messages<br /> - fix bug when checking on conditions, <a href="#var$processed">processed</a> wasn't propagated properly</li><li><strong>v 0.27</strong> 14/05/2009<br /> - look for the language files directory from __FILE__<br /> - deactivate <a href="#var$file_auto_rename">file_auto_rename</a> if <a href="#var$file_overwrite">file_overwrite</a> is set<br /> - improved transparency replacement for true color images<br /> - fixed calls to newer version of UNIX file utility<br /> - fixed error when using PECL Fileinfo extension in SAFE MODE, and when using the finfo class<br /> - added <a href="#var$image_precrop">image_precrop</a> to crop the image before an eventual resizing</li><li><strong>v 0.26</strong> 13/11/2008<br /> - rewrote conversion from palette to true color to handle transparency better<br /> - fixed imagecopymergealpha() when the overlayed image is of wrong dimensions<br /> - fixed imagecreatenew() when the image to create have less than 1 pixels width or height<br /> - rewrote MIME type detection to be more secure and not rely on browser information; now using Fileinfo PECL extension, UNIX file() command, MIME magic, and getimagesize(), in that order<br /> - added support for Flash uploaders<br /> - some bug fixing and error handling</li><li><strong>v 0.25</strong> 17/11/2007<br /> - added translation files and mechanism to instantiate the class with a language different from English<br /> - added <a href="#var$forbidden">forbidden</a> to set an array of forbidden MIME types<br /> - implemented support for simple wildcards in <a href="#var$allowed">allowed</a> and <a href="#var$forbidden">forbidden</a>, such as image/*<br /> - preset the file extension to the desired conversion format when converting an image<br /> - added read and write support for BMP images<br /> - added a flag file_is_image to determine if the file is a supported image type<br /> - the class now provides some information about the image, before calling <a href="#methodprocess">process</a>(). Available are image_src_x, image_src_y and the newly introduced image_src_bits, image_src_pixels and image_src_type. Note that this will not work if <em>open_basedir</em> restrictions are in place<br /> - improved logging; now provides useful system information<br /> - added some more pre-processing checks for files that are images: <a href="#var$image_max_width">image_max_width</a>, <a href="#var$image_max_height">image_max_height</a>, <a href="#var$image_max_pixels">image_max_pixels</a>, <a href="#var$image_max_ratio">image_max_ratio</a>, <a href="#var$image_min_width">image_min_width</a>, <a href="#var$image_min_height">image_min_height</a>, <a href="#var$image_min_pixels">image_min_pixels</a> and <a href="#var$image_min_ratio">image_min_ratio</a><br /> - added <a href="#var$image_ratio_pixels">image_ratio_pixels</a> to resize an image to a number of pixels, keeping aspect ratio<br /> - added <a href="#var$image_is_palette">image_is_palette</a> and <a href="#var$image_is_transparent">image_is_transparent</a> and <a href="#var$image_transparent_color">image_transparent_color</a> for GIF images<br /> - added <a href="#var$image_default_color">image_default_color</a> to define a fallback color for non alpha-transparent output formats, such as JPEG or BMP<br /> - changed <a href="#var$image_background_color">image_background_color</a>, which now forces transparent areas to be painted<br /> - improved reflections and color overlays so that it works with alpha transparent images<br /> - <a href="#var$image_reflection_color">image_reflection_color</a> is now deprecated in favour of <a href="#var$image_default_color">image_default_color</a><br /> - transparent PNGs are now processed in true color, and fully preserving the alpha channel when doing merges<br /> - transparent GIFs are now automatically detected. <a href="#var$preserve_transparency">preserve_transparency</a> is deprecated<br /> - transparent true color images can be saved as GIF while retaining transparency, semi transparent areas being merged with <a href="#var$image_default_color">image_default_color</a><br /> - transparent true color images can be saved as JPG/BMP with the semi transparent areas being merged with <a href="#var$image_default_color">image_default_color</a><br /> - fixed conversion of images to true color<br /> - the class can now output the uploaded files content as the return value of process() if the function is called with an empty or null argumenti, or no argument</li><li><strong>v 0.24</strong> 25/05/2007<br /> - added <a href="#var$image_background_color">image_background_color</a>, to set the default background color of an image<br /> - added possibility of using replacement tokens in text labels<br /> - changed default JPEG quality to 85<br /> - fixed a small bug when using greyscale filter and associated filters<br /> - added <a href="#var$image_ratio_fill">image_ratio_fill</a> in order to fit an image within some dimensions and color the remaining space. Very similar to <a href="#var$image_ratio_crop">image_ratio_crop</a><br /> - improved the recursive creation of directories<br /> - the class now converts palette based images to true colors before doing graphic manipulations</li><li><strong>v 0.23</strong> 23/12/2006<br /> - fixed a bug when processing more than once the same uploaded file. If there is an open_basedir restriction, the class now creates a temporary file for the first call to process(). This file will be used for subsequent processes, and will be deleted upon calling clean()</li><li><strong>v 0.22</strong> 16/12/2006<br /> - added automatic creation of a temporary file if the upload directory is not within open_basedir<br /> - fixed a bug which was preventing to work on a local file by overwriting it with its processed copy<br /> - added MIME types video/x-ms-wmv and image/x-png and fixed PNG support for IE weird MIME types<br /> - modified <a href="#var$image_ratio_crop">image_ratio_crop</a> so it can accept one or more from string 'TBLR', determining which side of the image is kept while cropping<br /> - added support for multiple lines in the text, using "\n" as a line break<br /> - added <a href="#var$image_text_line_spacing">image_text_line_spacing</a> which allow to set the space between several lines of text<br /> - added <a href="#var$image_text_alignment">image_text_alignment</a> which allow to set the alignment when text has several lines<br /> - <a href="#var$image_text_font">image_text_font</a> can now be set to the path of a GDF font to load external fonts<br /> - added <a href="#var$image_reflection_height">image_reflection_height</a> to create a reflection of the source image, which height is in pixels or percentage<br /> - added <a href="#var$image_reflection_space">image_reflection_space</a> to set the space in pixels between the source image and the reflection<br /> - added <a href="#var$image_reflection_color">image_reflection_color</a> to set the reflection background color<br /> - added <a href="#var$image_reflection_opacity">image_reflection_opacity</a> to set the initial level of opacity of the reflection</li><li><strong>v 0.21</strong> 30/09/2006<br /> - added <a href="#var$image_ratio_crop">image_ratio_crop</a> which resizes within <a href="#var$image_x">image_x</a> and <a href="#var$image_y">image_y</a>, keeping ratio, but filling the space by cropping excedent of image<br /> - added <a href="#var$mime_check">mime_check</a>, which default is true, to set checks against <a href="#var$allowed">allowed</a> MIME list<br /> - if MIME is empty, the class now triggers an error<br /> - color #000000 is OK for <a href="#var$image_text_color">image_text_color</a>, and related text transparency bug fixed<br /> - gd_version() now uses gd_info(), or else phpinfo()<br /> - fixed path issue when the destination path has no trailing slash on Windows systems <br /> - removed inline functions to be fully PHP5 compatible</li><li><strong>v 0.20</strong> 11/08/2006<br /> - added some more error checking and messages (GD presence, permissions...)<br /> - fix when uploading files without extension<br /> - changed values for <a href="#var$image_brightness">image_brightness</a> and <a href="#var$image_contrast">image_contrast</a> to be between -127 and 127<br /> - added <a href="#var$dir_auto_create">dir_auto_create</a> to automatically and recursively create destination directory if missing.<br /> - added <a href="#var$dir_auto_chmod">dir_auto_chmod</a> to automatically chmod the destination directory if not writeable.<br /> - added <a href="#var$dir_chmod">dir_chmod</a> to set the default chmod to use.<br /> - added <a href="#var$image_crop">image_crop</a> to crop images<br /> - added <a href="#var$image_negative">image_negative</a> to invert the colors on the image<br /> - added <a href="#var$image_greyscale">image_greyscale</a> to turn the image into greyscale<br /> - added <a href="#var$image_threshold">image_threshold</a> to apply a threshold filter on the image<br /> - added <a href="#var$image_bevel">image_bevel</a>, <a href="#var$image_bevel_color1">image_bevel_color1</a> and <a href="#var$image_bevel_color2">image_bevel_color2</a> to add a bevel border<br /> - added <a href="#var$image_border">image_border</a> and <a href="#var$image_border_color">image_border_color</a> to add a single color border<br /> - added <a href="#var$image_frame">image_frame</a> and <a href="#var$image_frame_colors">image_frame_colors</a> to add a multicolored frame</li><li><strong>v 0.19</strong> 29/03/2006<br /> - class is now compatible i18n (thanks Sylwester).<br /> - the class can mow manipulate local files, not only uploaded files (instanciate the class with a local filename).<br /> - <a href="#var$file_safe_name">file_safe_name</a> has been improved a bit.<br /> - added <a href="#var$image_brightness">image_brightness</a>, <a href="#var$image_contrast">image_contrast</a>, <a href="#var$image_tint_color">image_tint_color</a>, <a href="#var$image_overlay_color">image_overlay_color</a> and <a href="#var$image_overlay_percent">image_overlay_percent</a> to do color manipulation on the images.<br /> - added <a href="#var$image_text">image_text</a> and all derivated settings to add a text label on the image.<br /> - added <a href="#var$image_watermark">image_watermark</a> and all derivated settings to add a watermark image on the image.<br /> - added <a href="#var$image_flip">image_flip</a> and <a href="#var$image_rotate">image_rotate</a> for more image manipulations<br /> - added <a href="#var$jpeg_size">jpeg_size</a> to calculate the JPG compression quality in order to fit within one filesize.</li><li><strong>v 0.18</strong> 02/02/2006<br /> - added <a href="#var$no_script">no_script</a> to turn dangerous scripts into text files.<br /> - added mime_magic_check to set the class to use mime_magic.<br /> - added <a href="#var$preserve_transparency">preserve_transparency</a> *experimental*. Thanks Gregor.<br /> - fixed size and mime checking, wasn't working :/ Thanks Willem.<br /> - fixed memory leak when resizing images.<br /> - when resizing, it is not necessary anymore to set <a href="#var$image_convert">image_convert</a>.<br /> - il is now possible to simply convert an image, with no resizing.<br /> - sets the default <a href="#var$file_max_size">file_max_size</a> to upload_max_filesize from php.ini. Thanks Edward</li><li><strong>v 0.17</strong> 28/05/2005<br /> - the class can be used with any version of GD.<br /> - added security check on the file with a list of mime-types.<br /> - changed the license to GPL v2 only</li><li><strong>v 0.16</strong> 19/05/2005<br /> - added <a href="#var$file_auto_rename">file_auto_rename</a> automatic file renaming if the same filename already exists.<br /> - added <a href="#var$file_safe_name">file_safe_name</a> safe formatting of the filename (spaces to _underscores so far).<br /> - added some more error reporting to avoid crash if GD is not present</li><li><strong>v 0.15</strong> 16/04/2005<br /> - added JPEG compression quality setting. Thanks Vad</li><li><strong>v 0.14</strong> 14/03/2005<br /> - reworked the class file to allow parsing with phpDocumentor</li><li><strong>v 0.13</strong> 07/03/2005<br /> - fixed a bug with <a href="#var$image_ratio">image_ratio</a>. Thanks Justin.<br /> - added <a href="#var$image_ratio_no_zoom_in">image_ratio_no_zoom_in</a> and <a href="#var$image_ratio_no_zoom_out">image_ratio_no_zoom_out</a></li><li><strong>v 0.12</strong> 21/01/2005<br /> - added <a href="#var$image_ratio">image_ratio</a> to resize within max values, keeping image ratio</li><li><strong>v 0.11</strong> 22/08/2003<br /> - update for GD2 (changed imageresized() into imagecopyresampled() and imagecreate() into imagecreatetruecolor())</li></ul></p></p> <p class="notes"> </p> <pre></pre> </div> </div> <a name="sec-var-summary"></a> <div class="info-box"> <div class="info-box-title">Variable Summary</span></div> <div class="nav-bar"> <a href="#sec-description">Description</a> | <span class="disabled">Vars</span> (<a href="#sec-vars">details</a>) | <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>) </div> <div class="info-box-body"> <div class="var-summary"> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">array</span> <a href="#$allowed" title="details" class="var-name">$allowed</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">bool</span> <a href="#$dir_auto_chmod" title="details" class="var-name">$dir_auto_chmod</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">bool</span> <a href="#$dir_auto_create" title="details" class="var-name">$dir_auto_create</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">bool</span> <a href="#$dir_chmod" title="details" class="var-name">$dir_chmod</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$error" title="details" class="var-name">$error</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">bool</span> <a href="#$file_auto_rename" title="details" class="var-name">$file_auto_rename</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$file_dst_name" title="details" class="var-name">$file_dst_name</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$file_dst_name_body" title="details" class="var-name">$file_dst_name_body</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$file_dst_name_ext" title="details" class="var-name">$file_dst_name_ext</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">double</span> <a href="#$file_max_size" title="details" class="var-name">$file_max_size</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$file_name_body_add" title="details" class="var-name">$file_name_body_add</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$file_name_body_pre" title="details" class="var-name">$file_name_body_pre</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$file_new_name_body" title="details" class="var-name">$file_new_name_body</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$file_new_name_ext" title="details" class="var-name">$file_new_name_ext</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">bool</span> <a href="#$file_overwrite" title="details" class="var-name">$file_overwrite</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">boolean</span> <a href="#$file_safe_name" title="details" class="var-name">$file_safe_name</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$file_src_error" title="details" class="var-name">$file_src_error</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$file_src_mime" title="details" class="var-name">$file_src_mime</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$file_src_name" title="details" class="var-name">$file_src_name</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$file_src_name_body" title="details" class="var-name">$file_src_name_body</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$file_src_name_ext" title="details" class="var-name">$file_src_name_ext</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">double</span> <a href="#$file_src_size" title="details" class="var-name">$file_src_size</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">array</span> <a href="#$forbidden" title="details" class="var-name">$forbidden</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$image_background_color" title="details" class="var-name">$image_background_color</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_bevel" title="details" class="var-name">$image_bevel</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string;</span> <a href="#$image_bevel_color1" title="details" class="var-name">$image_bevel_color1</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string;</span> <a href="#$image_bevel_color2" title="details" class="var-name">$image_bevel_color2</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_border" title="details" class="var-name">$image_border</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string;</span> <a href="#$image_border_color" title="details" class="var-name">$image_border_color</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_brightness" title="details" class="var-name">$image_brightness</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_contrast" title="details" class="var-name">$image_contrast</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$image_convert" title="details" class="var-name">$image_convert</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$image_crop" title="details" class="var-name">$image_crop</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">boolean</span> <a href="#$image_default_color" title="details" class="var-name">$image_default_color</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string;</span> <a href="#$image_flip" title="details" class="var-name">$image_flip</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_frame" title="details" class="var-name">$image_frame</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$image_frame_colors" title="details" class="var-name">$image_frame_colors</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">boolean;</span> <a href="#$image_greyscale" title="details" class="var-name">$image_greyscale</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">boolean</span> <a href="#$image_is_palette" title="details" class="var-name">$image_is_palette</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">boolean</span> <a href="#$image_is_transparent" title="details" class="var-name">$image_is_transparent</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_max_height" title="details" class="var-name">$image_max_height</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">long</span> <a href="#$image_max_pixels" title="details" class="var-name">$image_max_pixels</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">float</span> <a href="#$image_max_ratio" title="details" class="var-name">$image_max_ratio</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_max_width" title="details" class="var-name">$image_max_width</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_min_height" title="details" class="var-name">$image_min_height</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">long</span> <a href="#$image_min_pixels" title="details" class="var-name">$image_min_pixels</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">float</span> <a href="#$image_min_ratio" title="details" class="var-name">$image_min_ratio</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_min_width" title="details" class="var-name">$image_min_width</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">boolean;</span> <a href="#$image_negative" title="details" class="var-name">$image_negative</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string;</span> <a href="#$image_overlay_color" title="details" class="var-name">$image_overlay_color</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_overlay_percent" title="details" class="var-name">$image_overlay_percent</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$image_precrop" title="details" class="var-name">$image_precrop</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">bool</span> <a href="#$image_ratio" title="details" class="var-name">$image_ratio</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">mixed</span> <a href="#$image_ratio_crop" title="details" class="var-name">$image_ratio_crop</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">mixed</span> <a href="#$image_ratio_fill" title="details" class="var-name">$image_ratio_fill</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">bool</span> <a href="#$image_ratio_no_zoom_in" title="details" class="var-name">$image_ratio_no_zoom_in</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">bool</span> <a href="#$image_ratio_no_zoom_out" title="details" class="var-name">$image_ratio_no_zoom_out</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">mixed</span> <a href="#$image_ratio_pixels" title="details" class="var-name">$image_ratio_pixels</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">bool</span> <a href="#$image_ratio_x" title="details" class="var-name">$image_ratio_x</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">bool</span> <a href="#$image_ratio_y" title="details" class="var-name">$image_ratio_y</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string;</span> <a href="#$image_reflection_color" title="details" class="var-name">$image_reflection_color</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">mixed;</span> <a href="#$image_reflection_height" title="details" class="var-name">$image_reflection_height</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_reflection_opacity" title="details" class="var-name">$image_reflection_opacity</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_reflection_space" title="details" class="var-name">$image_reflection_space</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">bool</span> <a href="#$image_resize" title="details" class="var-name">$image_resize</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string;</span> <a href="#$image_rotate" title="details" class="var-name">$image_rotate</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string;</span> <a href="#$image_text" title="details" class="var-name">$image_text</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string;</span> <a href="#$image_text_alignment" title="details" class="var-name">$image_text_alignment</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string;</span> <a href="#$image_text_background" title="details" class="var-name">$image_text_background</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_text_background_percent" title="details" class="var-name">$image_text_background_percent</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string;</span> <a href="#$image_text_color" title="details" class="var-name">$image_text_color</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string;</span> <a href="#$image_text_direction" title="details" class="var-name">$image_text_direction</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">mixed;</span> <a href="#$image_text_font" title="details" class="var-name">$image_text_font</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_text_line_spacing" title="details" class="var-name">$image_text_line_spacing</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_text_padding" title="details" class="var-name">$image_text_padding</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_text_padding_x" title="details" class="var-name">$image_text_padding_x</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_text_padding_y" title="details" class="var-name">$image_text_padding_y</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_text_percent" title="details" class="var-name">$image_text_percent</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string;</span> <a href="#$image_text_position" title="details" class="var-name">$image_text_position</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_text_x" title="details" class="var-name">$image_text_x</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_text_y" title="details" class="var-name">$image_text_y</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_threshold" title="details" class="var-name">$image_threshold</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string;</span> <a href="#$image_tint_color" title="details" class="var-name">$image_tint_color</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">boolean</span> <a href="#$image_transparent_color" title="details" class="var-name">$image_transparent_color</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string;</span> <a href="#$image_watermark" title="details" class="var-name">$image_watermark</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string;</span> <a href="#$image_watermark_position" title="details" class="var-name">$image_watermark_position</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_watermark_x" title="details" class="var-name">$image_watermark_x</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_watermark_y" title="details" class="var-name">$image_watermark_y</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_x" title="details" class="var-name">$image_x</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$image_y" title="details" class="var-name">$image_y</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$jpeg_quality" title="details" class="var-name">$jpeg_quality</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$jpeg_size" title="details" class="var-name">$jpeg_size</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">array</span> <a href="#$language" title="details" class="var-name">$language</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$log" title="details" class="var-name">$log</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">boolean</span> <a href="#$mime_check" title="details" class="var-name">$mime_check</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">boolean</span> <a href="#$mime_file" title="details" class="var-name">$mime_file</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">boolean</span> <a href="#$mime_fileinfo" title="details" class="var-name">$mime_fileinfo</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">boolean</span> <a href="#$mime_getimagesize" title="details" class="var-name">$mime_getimagesize</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">boolean</span> <a href="#$mime_magic" title="details" class="var-name">$mime_magic</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">boolean</span> <a href="#$no_script" title="details" class="var-name">$no_script</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">bool</span> <a href="#$no_upload_check" title="details" class="var-name">$no_upload_check</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">integer</span> <a href="#$preserve_transparency" title="details" class="var-name">$preserve_transparency</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">bool</span> <a href="#$processed" title="details" class="var-name">$processed</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">array</span> <a href="#$translation" title="details" class="var-name">$translation</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">bool</span> <a href="#$uploaded" title="details" class="var-name">$uploaded</a> </div> <div class="var-title"> <img src="phpdoc/Variable.png" alt=" " /> <span class="var-type">string</span> <a href="#$version" title="details" class="var-name">$version</a> </div> </div> </div> </div> <a name="sec-method-summary"></a> <div class="info-box"> <div class="info-box-title">Method Summary</span></div> <div class="nav-bar"> <a href="#sec-description">Description</a> | <a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>) | <span class="disabled">Methods</span> (<a href="#sec-methods">details</a>) </div> <div class="info-box-body"> <div class="method-summary"> <div class="method-definition"> <img src="phpdoc/Method.png" alt=" "/> <span class="method-result">void</span> <a href="#clean" title="details" class="method-name">clean</a> () </div> <div class="method-definition"> <img src="phpdoc/Method.png" alt=" "/> <span class="method-result">float</span> <a href="#gdversion" title="details" class="method-name">gdversion</a> ([<span class="var-type">boolean</span> <span class="var-name">$full</span> = <span class="var-default">false</span>]) </div> <div class="method-definition"> <img src="phpdoc/Method.png" alt=" "/> <span class="method-result">void</span> <a href="#imagebmp" title="details" class="method-name">imagebmp</a> (<span class="var-type"></span> <span class="var-name">&$im</span>, [<span class="var-type"></span> <span class="var-name">$filename</span> = <span class="var-default">""</span>]) </div> <div class="method-definition"> <img src="phpdoc/Method.png" alt=" "/> <span class="method-result">void</span> <a href="#imagecreatefrombmp" title="details" class="method-name">imagecreatefrombmp</a> (<span class="var-type"></span> <span class="var-name">$filename</span>) </div> <div class="method-definition"> <img src="phpdoc/Method.png" alt=" "/> <span class="method-result">string</span> <a href="#process" title="details" class="method-name">process</a> ([<span class="var-type">string</span> <span class="var-name">$server_path</span> = <span class="var-default">null</span>]) </div> </div> </div> </div> <a name="sec-vars"></a> <div class="info-box"> <div class="info-box-title">Variables</div> <div class="nav-bar"> <a href="#sec-description">Description</a> | <a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>) | <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>) </div> <div class="info-box-body"> <a name="var$allowed" id="$allowed"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">array</span> <span class="var-name">$allowed</span> (line <span class="line-number"><a href="class.upload.php.html#a1887">1887</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Allowed MIME types</p> <p class="description"><p>Default is a selection of safe mime-types, but you might want to change it</p><p>Simple wildcards are allowed, such as image/* or application/*</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$dir_auto_chmod" id="$dir_auto_chmod"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">bool</span> <span class="var-name">$dir_auto_chmod</span> (line <span class="line-number"><a href="class.upload.php.html#a916">916</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to true to allow automatic chmod of the destination directory if it is not writeable</p> <p class="description"><p>Default value is true</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$dir_auto_create" id="$dir_auto_create"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">bool</span> <span class="var-name">$dir_auto_create</span> (line <span class="line-number"><a href="class.upload.php.html#a905">905</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to true to allow automatic creation of the destination directory if it is missing (works recursively)</p> <p class="description"><p>Default value is true</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$dir_chmod" id="$dir_chmod"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">bool</span> <span class="var-name">$dir_chmod</span> (line <span class="line-number"><a href="class.upload.php.html#a927">927</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to the default chmod you want the class to use when creating directories, or attempting to write in a directory</p> <p class="description"><p>Default value is 0777 (without quotes)</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$error" id="$error"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$error</span> (line <span class="line-number"><a href="class.upload.php.html#a756">756</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Holds eventual error message in plain english</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_auto_rename" id="$file_auto_rename"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">bool</span> <span class="var-name">$file_auto_rename</span> (line <span class="line-number"><a href="class.upload.php.html#a894">894</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to true to allow automatic renaming of the file if the file already exists</p> <p class="description"><p>Default value is true</p><p>For instance, on uploading foo.ext,<br /> if foo.ext already exists, upload will be renamed foo_1.ext<br /> and if foo_1.ext already exists, upload will be renamed foo_2.ext<br /></p><p>Note that this option doesn't have any effect if <a href="#var$file_overwrite">file_overwrite</a> is true</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_dst_name" id="$file_dst_name"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$file_dst_name</span> (line <span class="line-number"><a href="class.upload.php.html#a617">617</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Destination file name</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_dst_name_body" id="$file_dst_name_body"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$file_dst_name_body</span> (line <span class="line-number"><a href="class.upload.php.html#a625">625</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Destination file name body (i.e. without extension)</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_dst_name_ext" id="$file_dst_name_ext"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$file_dst_name_ext</span> (line <span class="line-number"><a href="class.upload.php.html#a633">633</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Destination file extension</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_max_size" id="$file_max_size"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">double</span> <span class="var-name">$file_max_size</span> (line <span class="line-number"><a href="class.upload.php.html#a947">947</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to change the maximum size in bytes for an uploaded file</p> <p class="description"><p>Default value is the value <em>upload_max_filesize</em> from php.ini</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_name_body_add" id="$file_name_body_add"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$file_name_body_add</span> (line <span class="line-number"><a href="class.upload.php.html#a784">784</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to append a string to the file name body</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_name_body_pre" id="$file_name_body_pre"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$file_name_body_pre</span> (line <span class="line-number"><a href="class.upload.php.html#a792">792</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to prepend a string to the file name body</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_new_name_body" id="$file_new_name_body"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$file_new_name_body</span> (line <span class="line-number"><a href="class.upload.php.html#a776">776</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to replace the name body (i.e. without extension)</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_new_name_ext" id="$file_new_name_ext"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$file_new_name_ext</span> (line <span class="line-number"><a href="class.upload.php.html#a800">800</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to change the file extension</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_overwrite" id="$file_overwrite"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">bool</span> <span class="var-name">$file_overwrite</span> (line <span class="line-number"><a href="class.upload.php.html#a937">937</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable tu true to allow overwriting of an existing file</p> <p class="description"><p>Default value is false, so no files will be overwritten</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_safe_name" id="$file_safe_name"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">boolean</span> <span class="var-name">$file_safe_name</span> (line <span class="line-number"><a href="class.upload.php.html#a808">808</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to format the filename (spaces changed to _)</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_src_error" id="$file_src_error"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$file_src_error</span> (line <span class="line-number"><a href="class.upload.php.html#a585">585</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Holds eventual PHP error code from $_FILES</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_src_mime" id="$file_src_mime"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$file_src_mime</span> (line <span class="line-number"><a href="class.upload.php.html#a569">569</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Uploaded file MIME type</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_src_name" id="$file_src_name"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$file_src_name</span> (line <span class="line-number"><a href="class.upload.php.html#a545">545</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Uploaded file name</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_src_name_body" id="$file_src_name_body"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$file_src_name_body</span> (line <span class="line-number"><a href="class.upload.php.html#a553">553</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Uploaded file name body (i.e. without extension)</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_src_name_ext" id="$file_src_name_ext"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$file_src_name_ext</span> (line <span class="line-number"><a href="class.upload.php.html#a561">561</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Uploaded file name extension</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$file_src_size" id="$file_src_size"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">double</span> <span class="var-name">$file_src_size</span> (line <span class="line-number"><a href="class.upload.php.html#a577">577</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Uploaded file size, in bytes</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$forbidden" id="$forbidden"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">array</span> <span class="var-name">$forbidden</span> (line <span class="line-number"><a href="class.upload.php.html#a1900">1900</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Forbidden MIME types</p> <p class="description"><p>Default is a selection of safe mime-types, but you might want to change it To only check for forbidden MIME types, and allow everything else, set <a href="#var$allowed">allowed</a> to array('* / *') without the spaces</p><p>Simple wildcards are allowed, such as image/* or application/*</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_background_color" id="$image_background_color"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$image_background_color</span> (line <span class="line-number"><a href="class.upload.php.html#a1243">1243</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Background color, used to paint transparent areas with</p> <p class="description"><p>If set, it will forcibly remove transparency by painting transparent areas with the color This setting will fill in all transparent areas in PNG and GIF, as opposed to <a href="#var$image_default_color">image_default_color</a> which will do so only in BMP, JPEG, and alpha transparent areas in transparent GIFs This setting overrides <a href="#var$image_default_color">image_default_color</a></p><p>Default value is null</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_bevel" id="$image_bevel"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_bevel</span> (line <span class="line-number"><a href="class.upload.php.html#a1717">1717</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Adds a bevel border on the image</p> <p class="description"><p>Value is a positive integer, representing the thickness of the bevel</p><p>If the bevel colors are the same as the background, it makes a fade out effect</p><p>Default value is null (no bevel)</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_bevel_color1" id="$image_bevel_color1"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string;</span> <span class="var-name">$image_bevel_color1</span> (line <span class="line-number"><a href="class.upload.php.html#a1730">1730</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Top and left bevel color</p> <p class="description"><p>Value is a color, in hexadecimal format This setting is used only if <a href="#var$image_bevel">image_bevel</a> is set</p><p>Default value is #FFFFFF</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_bevel_color2" id="$image_bevel_color2"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string;</span> <span class="var-name">$image_bevel_color2</span> (line <span class="line-number"><a href="class.upload.php.html#a1743">1743</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Right and bottom bevel color</p> <p class="description"><p>Value is a color, in hexadecimal format This setting is used only if <a href="#var$image_bevel">image_bevel</a> is set</p><p>Default value is #000000</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_border" id="$image_border"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_border</span> (line <span class="line-number"><a href="class.upload.php.html#a1763">1763</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Adds a single-color border on the outer of the image</p> <p class="description"><p>Values are four dimensions, or two, or one (CSS style) They represent the border thickness top, right, bottom and left. These values can either be in an array, or a space separated string. Each value can be in pixels (with or without 'px'), or percentage (of the source image)</p><p>See <a href="#var$image_crop">image_crop</a> for valid formats</p><p>If a value is negative, the image will be cropped. Note that the dimensions of the picture will be increased by the borders' thickness</p><p>Default value is null (no border)</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_border_color" id="$image_border_color"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string;</span> <span class="var-name">$image_border_color</span> (line <span class="line-number"><a href="class.upload.php.html#a1776">1776</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Border color</p> <p class="description"><p>Value is a color, in hexadecimal format. This setting is used only if <a href="#var$image_border">image_border</a> is set</p><p>Default value is #FFFFFF</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_brightness" id="$image_brightness"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_brightness</span> (line <span class="line-number"><a href="class.upload.php.html#a1279">1279</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Corrects the image brightness</p> <p class="description"><p>Value can range between -127 and 127</p><p>Default value is null</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_contrast" id="$image_contrast"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_contrast</span> (line <span class="line-number"><a href="class.upload.php.html#a1291">1291</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Corrects the image contrast</p> <p class="description"><p>Value can range between -127 and 127</p><p>Default value is null</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_convert" id="$image_convert"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$image_convert</span> (line <span class="line-number"><a href="class.upload.php.html#a972">972</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to convert the file if it is an image</p> <p class="description"><p>Possibles values are : ''; 'png'; 'jpeg'; 'gif'; 'bmp'</p><p>Default value is '' (no conversion)<br /> If resize is true, convert will be set to the source file extension</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_crop" id="$image_crop"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$image_crop</span> (line <span class="line-number"><a href="class.upload.php.html#a1691">1691</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Crops an image</p> <p class="description"><p>Values are four dimensions, or two, or one (CSS style) They represent the amount cropped top, right, bottom and left. These values can either be in an array, or a space separated string. Each value can be in pixels (with or without 'px'), or percentage (of the source image)</p><p>For instance, are valid: <pre> $foo->image_crop = 20 OR array(20); $foo->image_crop = '20px' OR array('20px'); $foo->image_crop = '20 40' OR array('20', 40); $foo->image_crop = '-20 25%' OR array(-20, '25%'); $foo->image_crop = '20px 25%' OR array('20px', '25%'); $foo->image_crop = '20% 25%' OR array('20%', '25%'); $foo->image_crop = '20% 25% 10% 30%' OR array('20%', '25%', '10%', '30%'); $foo->image_crop = '20px 25px 2px 2px' OR array('20px', '25%px', '2px', '2px'); $foo->image_crop = '20 25% 40px 10%' OR array(20, '25%', '40px', '10%');</pre></p><p>If a value is negative, the image will be expanded, and the extra parts will be filled with black</p><p>Default value is null (no cropping)</p></p> <ul class="tags"> <li><span class="field">var:</span> OR array;</li> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_default_color" id="$image_default_color"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">boolean</span> <span class="var-name">$image_default_color</span> (line <span class="line-number"><a href="class.upload.php.html#a1259">1259</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Default color for non alpha-transparent images</p> <p class="description"><p>This setting is to be used to define a background color for semi transparent areas of an alpha transparent when the output format doesn't support alpha transparency This is useful when, from an alpha transparent PNG image, or an image with alpha transparent features if you want to output it as a transparent GIFs for instance, you can set a blending color for transparent areas If you output in JPEG or BMP, this color will be used to fill in the previously transparent areas</p><p>The default color white</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_flip" id="$image_flip"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string;</span> <span class="var-name">$image_flip</span> (line <span class="line-number"><a href="class.upload.php.html#a1649">1649</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Flips the image vertically or horizontally</p> <p class="description"><p>Value is either 'h' or 'v', as in horizontal and vertical</p><p>Default value is null (no flip)</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_frame" id="$image_frame"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_frame</span> (line <span class="line-number"><a href="class.upload.php.html#a1794">1794</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Adds a multi-color frame on the outer of the image</p> <p class="description"><p>Value is an integer. Two values are possible for now: <ol><li>for flat border, meaning that the frame is mirrored horizontally and vertically</li><li>for crossed border, meaning that the frame will be inversed, as in a bevel effect</li></ol> The frame will be composed of colored lines set in <a href="#var$image_frame_colors">image_frame_colors</a></p><p>Note that the dimensions of the picture will be increased by the borders' thickness</p><p>Default value is null (no frame)</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_frame_colors" id="$image_frame_colors"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$image_frame_colors</span> (line <span class="line-number"><a href="class.upload.php.html#a1817">1817</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the colors used to draw a frame</p> <p class="description"><p>Values is a list of n colors in hexadecimal format. These values can either be in an array, or a space separated string.</p><p>The colors are listed in the following order: from the outset of the image to its center</p><p>For instance, are valid: <pre> $foo->image_frame_colors = '#FFFFFF #999999 #666666 #000000'; $foo->image_frame_colors = array('#FFFFFF', '#999999', '#666666', '#000000');</pre></p><p>This setting is used only if <a href="#var$image_frame">image_frame</a> is set</p><p>Default value is '#FFFFFF #999999 #666666 #000000'</p></p> <ul class="tags"> <li><span class="field">var:</span> OR array;</li> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_greyscale" id="$image_greyscale"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">boolean;</span> <span class="var-name">$image_greyscale</span> (line <span class="line-number"><a href="class.upload.php.html#a1363">1363</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Turns the image into greyscale</p> <p class="description"><p>Default value is FALSE</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_is_palette" id="$image_is_palette"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">boolean</span> <span class="var-name">$image_is_palette</span> (line <span class="line-number"><a href="class.upload.php.html#a1267">1267</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Flag set to true when the image is not true color</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_is_transparent" id="$image_is_transparent"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">boolean</span> <span class="var-name">$image_is_transparent</span> (line <span class="line-number"><a href="class.upload.php.html#a1218">1218</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Flag set to true when the image is transparent</p> <p class="description"><p>This is actually used only for transparent GIFs</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_max_height" id="$image_max_height"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_max_height</span> (line <span class="line-number"><a href="class.upload.php.html#a1110">1110</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to set a maximum image height, above which the upload will be invalid</p> <p class="description"><p>Default value is null</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_max_pixels" id="$image_max_pixels"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">long</span> <span class="var-name">$image_max_pixels</span> (line <span class="line-number"><a href="class.upload.php.html#a1120">1120</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to set a maximum number of pixels for an image, above which the upload will be invalid</p> <p class="description"><p>Default value is null</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_max_ratio" id="$image_max_ratio"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">float</span> <span class="var-name">$image_max_ratio</span> (line <span class="line-number"><a href="class.upload.php.html#a1132">1132</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to set a maximum image aspect ratio, above which the upload will be invalid</p> <p class="description"><p>Note that ratio = width / height</p><p>Default value is null</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_max_width" id="$image_max_width"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_max_width</span> (line <span class="line-number"><a href="class.upload.php.html#a1100">1100</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to set a maximum image width, above which the upload will be invalid</p> <p class="description"><p>Default value is null</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_min_height" id="$image_min_height"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_min_height</span> (line <span class="line-number"><a href="class.upload.php.html#a1152">1152</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to set a minimum image height, below which the upload will be invalid</p> <p class="description"><p>Default value is null</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_min_pixels" id="$image_min_pixels"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">long</span> <span class="var-name">$image_min_pixels</span> (line <span class="line-number"><a href="class.upload.php.html#a1162">1162</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to set a minimum number of pixels for an image, below which the upload will be invalid</p> <p class="description"><p>Default value is null</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_min_ratio" id="$image_min_ratio"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">float</span> <span class="var-name">$image_min_ratio</span> (line <span class="line-number"><a href="class.upload.php.html#a1174">1174</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to set a minimum image aspect ratio, below which the upload will be invalid</p> <p class="description"><p>Note that ratio = width / height</p><p>Default value is null</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_min_width" id="$image_min_width"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_min_width</span> (line <span class="line-number"><a href="class.upload.php.html#a1142">1142</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to set a minimum image width, below which the upload will be invalid</p> <p class="description"><p>Default value is null</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_negative" id="$image_negative"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">boolean;</span> <span class="var-name">$image_negative</span> (line <span class="line-number"><a href="class.upload.php.html#a1353">1353</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Inverts the color of an image</p> <p class="description"><p>Default value is FALSE</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_overlay_color" id="$image_overlay_color"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string;</span> <span class="var-name">$image_overlay_color</span> (line <span class="line-number"><a href="class.upload.php.html#a1329">1329</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Applies a colored overlay on the image</p> <p class="description"><p>Value is an hexadecimal color, such as #FFFFFF</p><p>To use with <a href="#var$image_overlay_percent">image_overlay_percent</a></p><p>Default value is null</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_overlay_percent" id="$image_overlay_percent"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_overlay_percent</span> (line <span class="line-number"><a href="class.upload.php.html#a1343">1343</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the percentage for the colored overlay</p> <p class="description"><p>Value is a percentage, as an integer between 0 and 100</p><p>Unless used with <a href="#var$image_overlay_color">image_overlay_color</a>, this setting has no effect</p><p>Default value is 50</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_precrop" id="$image_precrop"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$image_precrop</span> (line <span class="line-number"><a href="class.upload.php.html#a1703">1703</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Crops an image, before an eventual resizing</p> <p class="description"><p>See <a href="#var$image_crop">image_crop</a> for valid formats</p><p>Default value is null (no cropping)</p></p> <ul class="tags"> <li><span class="field">var:</span> OR array;</li> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_ratio" id="$image_ratio"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">bool</span> <span class="var-name">$image_ratio</span> (line <span class="line-number"><a href="class.upload.php.html#a1002">1002</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to keep the original size ratio to fit within <a href="#var$image_x">image_x</a> x <a href="#var$image_y">image_y</a></p> <p class="description"><p>Default value is false</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_ratio_crop" id="$image_ratio_crop"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">mixed</span> <span class="var-name">$image_ratio_crop</span> (line <span class="line-number"><a href="class.upload.php.html#a1018">1018</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to keep the original size ratio to fit within <a href="#var$image_x">image_x</a> x <a href="#var$image_y">image_y</a></p> <p class="description"><p>The image will be resized as to fill the whole space, and excedent will be cropped</p><p>Value can also be a string, one or more character from 'TBLR' (top, bottom, left and right) If set as a string, it determines which side of the image is kept while cropping. By default, the part of the image kept is in the center, i.e. it crops equally on both sides</p><p>Default value is false</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_ratio_fill" id="$image_ratio_fill"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">mixed</span> <span class="var-name">$image_ratio_fill</span> (line <span class="line-number"><a href="class.upload.php.html#a1035">1035</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to keep the original size ratio to fit within <a href="#var$image_x">image_x</a> x <a href="#var$image_y">image_y</a></p> <p class="description"><p>The image will be resized to fit entirely in the space, and the rest will be colored. The default color is white, but can be set with <a href="#var$image_default_color">image_default_color</a></p><p>Value can also be a string, one or more character from 'TBLR' (top, bottom, left and right) If set as a string, it determines in which side of the space the image is displayed. By default, the image is displayed in the center, i.e. it fills the remaining space equally on both sides</p><p>Default value is false</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_ratio_no_zoom_in" id="$image_ratio_no_zoom_in"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">bool</span> <span class="var-name">$image_ratio_no_zoom_in</span> (line <span class="line-number"><a href="class.upload.php.html#a1059">1059</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to keep the original size ratio to fit within <a href="#var$image_x">image_x</a> x <a href="#var$image_y">image_y</a>, but only if original image is bigger</p> <p class="description"><p>Default value is false</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_ratio_no_zoom_out" id="$image_ratio_no_zoom_out"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">bool</span> <span class="var-name">$image_ratio_no_zoom_out</span> (line <span class="line-number"><a href="class.upload.php.html#a1070">1070</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to keep the original size ratio to fit within <a href="#var$image_x">image_x</a> x <a href="#var$image_y">image_y</a>, but only if original image is smaller</p> <p class="description"><p>Default value is false</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_ratio_pixels" id="$image_ratio_pixels"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">mixed</span> <span class="var-name">$image_ratio_pixels</span> (line <span class="line-number"><a href="class.upload.php.html#a1048">1048</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to a number of pixels so that <a href="#var$image_x">image_x</a> and <a href="#var$image_y">image_y</a> are the best match possible</p> <p class="description"><p>The image will be resized to have approximatively the number of pixels The aspect ratio wil be conserved</p><p>Default value is false</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_ratio_x" id="$image_ratio_x"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">bool</span> <span class="var-name">$image_ratio_x</span> (line <span class="line-number"><a href="class.upload.php.html#a1080">1080</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to calculate <a href="#var$image_x">image_x</a> automatically , using <a href="#var$image_y">image_y</a> and conserving ratio</p> <p class="description"><p>Default value is false</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_ratio_y" id="$image_ratio_y"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">bool</span> <span class="var-name">$image_ratio_y</span> (line <span class="line-number"><a href="class.upload.php.html#a1090">1090</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to calculate <a href="#var$image_y">image_y</a> automatically , using <a href="#var$image_x">image_x</a> and conserving ratio</p> <p class="description"><p>Default value is false</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_reflection_color" id="$image_reflection_color"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string;</span> <span class="var-name">$image_reflection_color</span> (line <span class="line-number"><a href="class.upload.php.html#a1622">1622</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the color of the reflection background (deprecated)</p> <p class="description"><p>Value is an hexadecimal color, such as #FFFFFF</p><p>Default value is #FFFFFF</p><p>This setting is relevant only if <a href="#var$image_reflection_height">image_reflection_height</a> is set</p><p>This setting is now deprecated in favor of <a href="#var$image_default_color">image_default_color</a></p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_reflection_height" id="$image_reflection_height"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">mixed;</span> <span class="var-name">$image_reflection_height</span> (line <span class="line-number"><a href="class.upload.php.html#a1592">1592</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the height of the reflection</p> <p class="description"><p>Value is an integer in pixels, or a string which format can be in pixels or percentage. For instance, values can be : 40, '40', '40px' or '40%'</p><p>Default value is null, no reflection</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_reflection_opacity" id="$image_reflection_opacity"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_reflection_opacity</span> (line <span class="line-number"><a href="class.upload.php.html#a1637">1637</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the initial opacity of the reflection</p> <p class="description"><p>Value is an integer between 0 (no opacity) and 100 (full opacity). The reflection will start from <a href="#var$image_reflection_opacity">image_reflection_opacity</a> and end up at 0</p><p>Default value is 60</p><p>This setting is relevant only if <a href="#var$image_reflection_height">image_reflection_height</a> is set</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_reflection_space" id="$image_reflection_space"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_reflection_space</span> (line <span class="line-number"><a href="class.upload.php.html#a1606">1606</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the space between the source image and its relection</p> <p class="description"><p>Value is an integer in pixels, which can be negative</p><p>Default value is 2</p><p>This setting is relevant only if <a href="#var$image_reflection_height">image_reflection_height</a> is set</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_resize" id="$image_resize"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">bool</span> <span class="var-name">$image_resize</span> (line <span class="line-number"><a href="class.upload.php.html#a959">959</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to true to resize the file if it is an image</p> <p class="description"><p>You will probably want to set <a href="#var$image_x">image_x</a> and <a href="#var$image_y">image_y</a>, and maybe one of the ratio variables</p><p>Default value is false (no resizing)</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_rotate" id="$image_rotate"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string;</span> <span class="var-name">$image_rotate</span> (line <span class="line-number"><a href="class.upload.php.html#a1661">1661</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Rotates the image by increments of 45 degrees</p> <p class="description"><p>Value is either 90, 180 or 270</p><p>Default value is null (no rotation)</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_text" id="$image_text"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string;</span> <span class="var-name">$image_text</span> (line <span class="line-number"><a href="class.upload.php.html#a1389">1389</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Adds a text label on the image</p> <p class="description"><p>Value is a string, any text. Text will not word-wrap, although you can use breaklines in your text "\n"</p><p>If set, this setting allow the use of all other settings starting with image_text_</p><p>Replacement tokens can be used in the string: <pre> gd_version src_name src_name_body src_name_ext src_pathname src_mime src_x src_y src_type src_bits src_pixels src_size src_size_kb src_size_mb src_size_human dst_path dst_name_body dst_pathname dst_name dst_name_ext dst_x dst_y date time host server ip</pre> The tokens must be enclosed in square brackets: [dst_x] will be replaced by the width of the picture</p><p>Default value is null</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_text_alignment" id="$image_text_alignment"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string;</span> <span class="var-name">$image_text_alignment</span> (line <span class="line-number"><a href="class.upload.php.html#a1565">1565</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the text alignment</p> <p class="description"><p>Value is a string, which can be either 'L', 'C' or 'R'</p><p>Default value is 'C'</p><p>This setting is relevant only if the text has several lines.</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_text_background" id="$image_text_background"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string;</span> <span class="var-name">$image_text_background</span> (line <span class="line-number"><a href="class.upload.php.html#a1437">1437</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the text background color for the text label</p> <p class="description"><p>Value is an hexadecimal color, such as #FFFFFF</p><p>Default value is null (no background)</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_text_background_percent" id="$image_text_background_percent"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_text_background_percent</span> (line <span class="line-number"><a href="class.upload.php.html#a1449">1449</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the text background visibility in the text label</p> <p class="description"><p>Value is a percentage, as an integer between 0 and 100</p><p>Default value is 100</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_text_color" id="$image_text_color"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string;</span> <span class="var-name">$image_text_color</span> (line <span class="line-number"><a href="class.upload.php.html#a1413">1413</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the text color for the text label</p> <p class="description"><p>Value is an hexadecimal color, such as #FFFFFF</p><p>Default value is #FFFFFF (white)</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_text_direction" id="$image_text_direction"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string;</span> <span class="var-name">$image_text_direction</span> (line <span class="line-number"><a href="class.upload.php.html#a1401">1401</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the text direction for the text label</p> <p class="description"><p>Value is either 'h' or 'v', as in horizontal and vertical</p><p>Default value is h (horizontal)</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_text_font" id="$image_text_font"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">mixed;</span> <span class="var-name">$image_text_font</span> (line <span class="line-number"><a href="class.upload.php.html#a1462">1462</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the text font in the text label</p> <p class="description"><p>Value is a an integer between 1 and 5 for GD built-in fonts. 1 is the smallest font, 5 the biggest Value can also be a string, which represents the path to a GDF font. The font will be loaded into GD, and used as a built-in font.</p><p>Default value is 5</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_text_line_spacing" id="$image_text_line_spacing"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_text_line_spacing</span> (line <span class="line-number"><a href="class.upload.php.html#a1579">1579</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the text line spacing</p> <p class="description"><p>Value is an integer, in pixels</p><p>Default value is 0</p><p>This setting is relevant only if the text has several lines.</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_text_padding" id="$image_text_padding"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_text_padding</span> (line <span class="line-number"><a href="class.upload.php.html#a1523">1523</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the text label padding</p> <p class="description"><p>Value is in pixels, representing the distance between the text and the label background border</p><p>Default value is 0</p><p>This setting can be overriden by <a href="#var$image_text_padding_x">image_text_padding_x</a> and <a href="#var$image_text_padding_y">image_text_padding_y</a></p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_text_padding_x" id="$image_text_padding_x"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_text_padding_x</span> (line <span class="line-number"><a href="class.upload.php.html#a1537">1537</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the text label horizontal padding</p> <p class="description"><p>Value is in pixels, representing the distance between the text and the left and right label background borders</p><p>Default value is null</p><p>If set, this setting overrides the horizontal part of <a href="#var$image_text_padding">image_text_padding</a></p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_text_padding_y" id="$image_text_padding_y"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_text_padding_y</span> (line <span class="line-number"><a href="class.upload.php.html#a1551">1551</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the text label vertical padding</p> <p class="description"><p>Value is in pixels, representing the distance between the text and the top and bottom label background borders</p><p>Default value is null</p><p>If set, his setting overrides the vertical part of <a href="#var$image_text_padding">image_text_padding</a></p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_text_percent" id="$image_text_percent"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_text_percent</span> (line <span class="line-number"><a href="class.upload.php.html#a1425">1425</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the text visibility in the text label</p> <p class="description"><p>Value is a percentage, as an integer between 0 and 100</p><p>Default value is 100</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_text_position" id="$image_text_position"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string;</span> <span class="var-name">$image_text_position</span> (line <span class="line-number"><a href="class.upload.php.html#a1483">1483</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the text label position within the image</p> <p class="description"><p>Value is one or two out of 'TBLR' (top, bottom, left, right)</p><p>The positions are as following: <pre> TL T TR L R BL B BR</pre></p><p>Default value is null (centered, horizontal and vertical)</p><p>Note that is <a href="#var$image_text_x">image_text_x</a> and <a href="#var$image_text_y">image_text_y</a> are used, this setting has no effect</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_text_x" id="$image_text_x"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_text_x</span> (line <span class="line-number"><a href="class.upload.php.html#a1496">1496</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the text label absolute X position within the image</p> <p class="description"><p>Value is in pixels, representing the distance between the left of the image and the label If a negative value is used, it will represent the distance between the right of the image and the label</p><p>Default value is null (so <a href="#var$image_text_position">image_text_position</a> is used)</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_text_y" id="$image_text_y"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_text_y</span> (line <span class="line-number"><a href="class.upload.php.html#a1509">1509</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the text label absolute Y position within the image</p> <p class="description"><p>Value is in pixels, representing the distance between the top of the image and the label If a negative value is used, it will represent the distance between the bottom of the image and the label</p><p>Default value is null (so <a href="#var$image_text_position">image_text_position</a> is used)</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_threshold" id="$image_threshold"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_threshold</span> (line <span class="line-number"><a href="class.upload.php.html#a1303">1303</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Applies threshold filter</p> <p class="description"><p>Value can range between -127 and 127</p><p>Default value is null</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_tint_color" id="$image_tint_color"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string;</span> <span class="var-name">$image_tint_color</span> (line <span class="line-number"><a href="class.upload.php.html#a1315">1315</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Applies a tint on the image</p> <p class="description"><p>Value is an hexadecimal color, such as #FFFFFF</p><p>Default value is null</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_transparent_color" id="$image_transparent_color"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">boolean</span> <span class="var-name">$image_transparent_color</span> (line <span class="line-number"><a href="class.upload.php.html#a1228">1228</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Transparent color in a palette</p> <p class="description"><p>This is actually used only for transparent GIFs</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_watermark" id="$image_watermark"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string;</span> <span class="var-name">$image_watermark</span> (line <span class="line-number"><a href="class.upload.php.html#a1831">1831</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Adds a watermark on the image</p> <p class="description"><p>Value is a local image filename, relative or absolute. GIF, JPG, BMP and PNG are supported, as well as PNG alpha.</p><p>If set, this setting allow the use of all other settings starting with image_watermark_</p><p>Default value is null</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_watermark_position" id="$image_watermark_position"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string;</span> <span class="var-name">$image_watermark_position</span> (line <span class="line-number"><a href="class.upload.php.html#a1849">1849</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the watermarkposition within the image</p> <p class="description"><p>Value is one or two out of 'TBLR' (top, bottom, left, right)</p><p>The positions are as following: TL T TR L R BL B BR</p><p>Default value is null (centered, horizontal and vertical)</p><p>Note that is <a href="#var$image_watermark_x">image_watermark_x</a> and <a href="#var$image_watermark_y">image_watermark_y</a> are used, this setting has no effect</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_watermark_x" id="$image_watermark_x"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_watermark_x</span> (line <span class="line-number"><a href="class.upload.php.html#a1862">1862</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the watermark absolute X position within the image</p> <p class="description"><p>Value is in pixels, representing the distance between the top of the image and the watermark If a negative value is used, it will represent the distance between the bottom of the image and the watermark</p><p>Default value is null (so <a href="#var$image_watermark_position">image_watermark_position</a> is used)</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_watermark_y" id="$image_watermark_y"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_watermark_y</span> (line <span class="line-number"><a href="class.upload.php.html#a1875">1875</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Sets the twatermark absolute Y position within the image</p> <p class="description"><p>Value is in pixels, representing the distance between the left of the image and the watermark If a negative value is used, it will represent the distance between the right of the image and the watermark</p><p>Default value is null (so <a href="#var$image_watermark_position">image_watermark_position</a> is used)</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_x" id="$image_x"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_x</span> (line <span class="line-number"><a href="class.upload.php.html#a982">982</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to the wanted (or maximum/minimum) width for the processed image, in pixels</p> <p class="description"><p>Default value is 150</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$image_y" id="$image_y"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$image_y</span> (line <span class="line-number"><a href="class.upload.php.html#a992">992</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to the wanted (or maximum/minimum) height for the processed image, in pixels</p> <p class="description"><p>Default value is 150</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$jpeg_quality" id="$jpeg_quality"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$jpeg_quality</span> (line <span class="line-number"><a href="class.upload.php.html#a1184">1184</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Quality of JPEG created/converted destination image</p> <p class="description"><p>Default value is 85</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$jpeg_size" id="$jpeg_size"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$jpeg_size</span> (line <span class="line-number"><a href="class.upload.php.html#a1197">1197</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Determines the quality of the JPG image to fit a desired file size</p> <p class="description"><p>Value is in bytes. The JPG quality will be set between 1 and 100% The calculations are approximations.</p><p>Default value is null (no calculations)</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$language" id="$language"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">array</span> <span class="var-name">$language</span> (line <span class="line-number"><a href="class.upload.php.html#a1921">1921</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Language selected for the translations</p> <p class="description"><p>By default, the language is english ("en_GB")</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$log" id="$log"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$log</span> (line <span class="line-number"><a href="class.upload.php.html#a764">764</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Holds an HTML formatted log</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$mime_check" id="$mime_check"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">boolean</span> <span class="var-name">$mime_check</span> (line <span class="line-number"><a href="class.upload.php.html#a818">818</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to false if you don't want to check the MIME against the allowed list</p> <p class="description"><p>This variable is set to true by default for security reason</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$mime_file" id="$mime_file"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">boolean</span> <span class="var-name">$mime_file</span> (line <span class="line-number"><a href="class.upload.php.html#a843">843</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to false if you don't want to check the MIME with UNIX file() command</p> <p class="description"><p>This variable is set to true by default for security reason</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$mime_fileinfo" id="$mime_fileinfo"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">boolean</span> <span class="var-name">$mime_fileinfo</span> (line <span class="line-number"><a href="class.upload.php.html#a833">833</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to false if you don't want to check the MIME with Fileinfo PECL extension</p> <p class="description"><p>You can also set it with the path of the magic database file. If set to true, the class will try to read the MAGIC environment variable and if it is empty, will default to '/usr/share/file/magic' If set to an empty string, it will call finfo_open without the path argument</p><p>This variable is set to true by default for security reason</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$mime_getimagesize" id="$mime_getimagesize"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">boolean</span> <span class="var-name">$mime_getimagesize</span> (line <span class="line-number"><a href="class.upload.php.html#a869">869</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to false if you don't want to check the MIME with getimagesize()</p> <p class="description"><p>The class tries to get a MIME type from getimagesize() If no MIME is returned, it tries to guess the MIME type from the file type</p><p>This variable is set to true by default for security reason</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$mime_magic" id="$mime_magic"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">boolean</span> <span class="var-name">$mime_magic</span> (line <span class="line-number"><a href="class.upload.php.html#a856">856</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to false if you don't want to check the MIME with the magic.mime file</p> <p class="description"><p>The function mime_content_type() will be deprecated, and this variable will be set to false in a future release</p><p>This variable is set to true by default for security reason</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$no_script" id="$no_script"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">boolean</span> <span class="var-name">$no_script</span> (line <span class="line-number"><a href="class.upload.php.html#a877">877</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Set this variable to false if you don't want to turn dangerous scripts into simple text files</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$no_upload_check" id="$no_upload_check"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">bool</span> <span class="var-name">$no_upload_check</span> (line <span class="line-number"><a href="class.upload.php.html#a738">738</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Flag stopping PHP upload checks</p> <p class="description"><p>Indicates whether we instanciated the class with a filename, in which case we will not check on the validity of the PHP *upload*</p><p>This flag is automatically set to true when working on a local file</p><p>Warning: for uploads, this flag MUST be set to false for security reason</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$preserve_transparency" id="$preserve_transparency"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">integer</span> <span class="var-name">$preserve_transparency</span> (line <span class="line-number"><a href="class.upload.php.html#a1208">1208</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Preserve transparency when resizing or converting an image (deprecated)</p> <p class="description"><p>Default value is automatically set to true for transparent GIFs This setting is now deprecated</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$processed" id="$processed"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">bool</span> <span class="var-name">$processed</span> (line <span class="line-number"><a href="class.upload.php.html#a748">748</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Flag set after calling a process</p> <p class="description"><p>Indicates if the processing, and copy of the resulting file went OK</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$translation" id="$translation"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">array</span> <span class="var-name">$translation</span> (line <span class="line-number"><a href="class.upload.php.html#a1911">1911</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Array of translated error messages</p> <p class="description"><p>By default, the language is english (en_GB) Translations can be in separate files, in a lang/ subdirectory</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$uploaded" id="$uploaded"><!-- --></A> <div class="evenrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">bool</span> <span class="var-name">$uploaded</span> (line <span class="line-number"><a href="class.upload.php.html#a723">723</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Flag set after instanciating the class</p> <p class="description"><p>Indicates if the file has been uploaded properly</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> <a name="var$version" id="$version"><!-- --></A> <div class="oddrow"> <div class="var-header"> <img src="phpdoc/Variable.png" /> <span class="var-title"> <span class="var-type">string</span> <span class="var-name">$version</span> (line <span class="line-number"><a href="class.upload.php.html#a537">537</a></span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Class version</p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> </div> </div> </div> <a name="sec-methods"></a> <div class="info-box"> <div class="info-box-title">Methods</div> <div class="nav-bar"> <a href="#sec-description">Description</a> | <a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>) <a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>) </div> <div class="info-box-body"> <A NAME='method_detail'></A> <a name="methodclean" id="clean"><!-- --></a> <div class="evenrow"> <div class="method-header"> <img src="phpdoc/Method.png" /> <span class="method-title">clean</span> (line <span class="line-number"><a href="class.upload.php.html#a4630">4630</a></span>) </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Deletes the uploaded file from its temporary location</p> <p class="description"><p>When PHP uploads a file, it stores it in a temporary location. When you <a href="#methodprocess">process</a> the file, you actually copy the resulting file to the given location, it doesn't alter the original file. Once you have processed the file as many times as you wanted, you can delete the uploaded file. If there is open_basedir restrictions, the uploaded file is in fact a temporary file</p><p>You might want not to use this function if you work on local files, as it will delete the source file</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> <div class="method-signature"> <span class="method-result">void</span> <span class="method-name"> clean </span> () </div> </div> <a name="methodgdversion" id="gdversion"><!-- --></a> <div class="oddrow"> <div class="method-header"> <img src="phpdoc/Method.png" /> <span class="method-title">gdversion</span> (line <span class="line-number"><a href="class.upload.php.html#a2834">2834</a></span>) </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Returns the version of GD</p> <ul class="tags"> <li><span class="field">return:</span> GD version</li> <li><span class="field">access:</span> public</li> </ul> <div class="method-signature"> <span class="method-result">float</span> <span class="method-name"> gdversion </span> ([<span class="var-type">boolean</span> <span class="var-name">$full</span> = <span class="var-default">false</span>]) </div> <ul class="parameters"> <li> <span class="var-type">boolean</span> <span class="var-name">$full</span><span class="var-description">: Optional flag to get precise version</span> </li> </ul> </div> <a name="methodimagebmp" id="imagebmp"><!-- --></a> <div class="evenrow"> <div class="method-header"> <img src="phpdoc/Method.png" /> <span class="method-title">imagebmp</span> (line <span class="line-number"><a href="class.upload.php.html#a4719">4719</a></span>) </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Saves a BMP image</p> <p class="description"><p>This function has been published on the PHP website, and can be used freely</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> <div class="method-signature"> <span class="method-result">void</span> <span class="method-name"> imagebmp </span> (<span class="var-type"></span> <span class="var-name">&$im</span>, [<span class="var-type"></span> <span class="var-name">$filename</span> = <span class="var-default">""</span>]) </div> <ul class="parameters"> <li> <span class="var-type"></span> <span class="var-name">&$im</span> </li> <li> <span class="var-type"></span> <span class="var-name">$filename</span> </li> </ul> </div> <a name="methodimagecreatefrombmp" id="imagecreatefrombmp"><!-- --></a> <div class="oddrow"> <div class="method-header"> <img src="phpdoc/Method.png" /> <span class="method-title">imagecreatefrombmp</span> (line <span class="line-number"><a href="class.upload.php.html#a4644">4644</a></span>) </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Opens a BMP image</p> <p class="description"><p>This function has been written by DHKold, and is used with permission of the author</p></p> <ul class="tags"> <li><span class="field">access:</span> public</li> </ul> <div class="method-signature"> <span class="method-result">void</span> <span class="method-name"> imagecreatefrombmp </span> (<span class="var-type"></span> <span class="var-name">$filename</span>) </div> <ul class="parameters"> <li> <span class="var-type"></span> <span class="var-name">$filename</span> </li> </ul> </div> <a name="methodprocess" id="process"><!-- --></a> <div class="evenrow"> <div class="method-header"> <img src="phpdoc/Method.png" /> <span class="method-title">process</span> (line <span class="line-number"><a href="class.upload.php.html#a3069">3069</a></span>) </div> <!-- ========== Info from phpDoc block ========= --> <p class="short-description">Actually uploads the file, and act on it according to the set processing class variables</p> <p class="description"><p>This function copies the uploaded file to the given location, eventually performing actions on it. Typically, you can call <a href="#methodprocess">process</a> several times for the same file, for instance to create a resized image and a thumbnail of the same file. The original uploaded file remains intact in its temporary location, so you can use <a href="#methodprocess">process</a> several times. You will be able to delete the uploaded file with <a href="#methodclean">clean</a> when you have finished all your <a href="#methodprocess">process</a> calls.</p><p>According to the processing class variables set in the calling file, the file can be renamed, and if it is an image, can be resized or converted.</p><p>When the processing is completed, and the file copied to its new location, the processing class variables will be reset to their default value. This allows you to set new properties, and perform another <a href="#methodprocess">process</a> on the same uploaded file</p><p>If the function is called with a null or empty argument, then it will return the content of the picture</p><p>It will set <a href="#var$processed">processed</a> (and <a href="#var$error">error</a> is an error occurred)</p></p> <ul class="tags"> <li><span class="field">return:</span> Optional content of the image</li> <li><span class="field">access:</span> public</li> </ul> <div class="method-signature"> <span class="method-result">string</span> <span class="method-name"> process </span> ([<span class="var-type">string</span> <span class="var-name">$server_path</span> = <span class="var-default">null</span>]) </div> <ul class="parameters"> <li> <span class="var-type">string</span> <span class="var-name">$server_path</span><span class="var-description">: Optional path location of the uploaded file, with an ending slash</span> </li> </ul> </div> </div> </div> <p class="notes" id="credit"> </p> </div></body> </html>