www.archive-net-2013.com » NET » V » VEROT

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".

    Archived pages: 528 . Archive date: 2013-04.

  • Title: Web development, design and free software code - verot.net
    Descriptive info: .. verot.. net.. quality web development.. Home.. About.. Portfolio.. Coding.. Recordings.. Contact.. Latest news.. Class upload 0.. 32.. The.. version 0.. is out, with new features, improvements and bug fixes.. Check out some.. samples.. , the.. changelog.. documentation.. and.. download it.. !.. New field recordings.. Some more.. field recordings.. done in.. Philippines.. in December.. Portfolio web apps section.. I have added a new section in my.. portfolio.. to showcase some of the.. web apps.. I have done.. more news.. RSS feed.. class.. upload.. php.. is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways.. The script is available under a GPL license.. latest version:.. 0.. Hosted on verot.. ACIHL.. Man from Uranus.. The Vichy Government.. Electronaut Records.. Ribeyron Agro.. Amandine Gay.. Mezzo Monde.. Collectif Curry-Vavart.. EcoConfiance Renovation.. Alltrip-Tourism.. La Débordante.. Jérémy Philippeau..  ...   code.. What can you find here?.. You may be interested in my.. PHP.. I just released the 0.. 32 version, with a lot of new features.. Or maybe.. The CMF.. project, a content management framework system I am developing and using.. The CMF for instance powers this very site.. There is also a rather useful page on.. how to bypass strict firewalls on public wifi hotspots and restricted networks.. and a section in which I publish.. scripts and howtos.. for Linux.. I recently uploaded some.. , which you can listen or download.. Need some directions?.. You may want to know more.. about me.. ,.. my skills.. , browse.. my portfolio.. or read about.. why you.. should.. could.. hire me.. print version.. |.. plain text version.. copyright.. 2001-2013 ©.. Colin Verot.. - powered by.. Template design by.. Six Shooter Media..

    Original link path: /
    Open archive

  • Title: Web development, design and free software code - verot.net
    Original link path: /home.htm
    (No additional info available in detailed archive for this subpage)

  • Title: About - verot.net
    Descriptive info: My skills.. Hire me!.. Some photos.. My name is Colin VEROT, I'm french, but I live and work everywhere in the world.. As of now, I am back in France, working for an online newspaper called.. Rue89.. I am a freelance web designer and web developer amongst other things.. I have been fond of computing for a long time, and began to program when I was a child.. I now have an extensive knowledge of programming, design, and networking, which I try to increase every day.. I am a web expert (PHP/MySQL), as well as a sysadmin.. I am running my own projects, such as the.. PHP upload class.. or.. I am doing  ...   a computer school, and have worked for several companies, in France, UK, and Australia, doing websites amongst other things.. I learnt about professional design, efficient website creation and customer relationships.. I have been freelancing for more than eight years, working on various projects, mainly doing coding or consulting and focusing on free software software.. I am also a fully trained projectionist, after working for two years in the.. Cambridge Arts Cinema.. This is a very good cinema, and I had the opportunity to work in a fully equipped 3-screens projection box with highly experienced people.. I occasionally work on film festivals in UK, and hopefully in some other festivals around the world.. C..

    Original link path: /about.htm
    Open archive

  • Title: Portfolio - verot.net
    Descriptive info: Websites.. Web apps.. Web works.. Artwork.. Corporate.. LS themes.. In this section, you will find all the.. websites.. coding jobs.. I have done, and as well a few Litestep themes and some artwork, such as logos, flyers, website designs.. Here on the left is a little slideshow of my portfolio.. But please feel free to browse through  ...   applications.. other web works.. logos.. business cards.. what I do for fun:.. artwork.. CD covers.. flyers.. themes.. wallpapers.. Litestep themes.. some other things:.. a.. video of the Man From Uranus.. , taken during.. Transmission Failure.. in Cambridge, 2007.. contribution to a performance of.. Relive The Food.. of the band.. Now.. , live on FM in Cambridge, 2007..

    Original link path: /portfolio.htm
    Open archive

  • Title: Coding - verot.net
    Descriptive info: PHP.. Javascript.. Scripts.. SOCKS & wifi hotspots.. Unless specified, all the code presented here is released under the GPL version 2 license.. I support free software and open source code.. You can find.. here.. a PHP class to upload files, and manipulate images.. I use it in many applications, and it is my most successful open source project!.. Also here is a rather useful page on.. how to bypass strict firewalls on public wifi hotspots and restricted networks, by tunneling blocked  ...   howtos.. Elegance?.. Pardon me, Your Honor, the concept is not easy to explain -- there is an ineffable quality to some technology, described by its creators as a concinnitous, or technically sweet, or a nice hack -- signs that it was made with great care by one who was not merely motivated but inspired.. It is the difference between an engineer and a hacker.. Judge Fang and Miss Pao in.. Neal Stephenson.. 's.. The Diamond Age, or, A Young Lady's Illustrated Primer..

    Original link path: /coding.htm
    Open archive

  • Title: Field recordings - verot.net
    Descriptive info: France.. Togo.. Italy.. Greece.. Morocco.. United Kingdom.. Field recordings.. I started to do some field recordings, after I bought a Zoom H4n recording device for a project in Togo.. Most of them are in MP3 256Kbps.. I will upload some more files regularly.. Locations.. How to listen?.. Best is to listen to the recordings with a good quality headset.. Then, lie back, close your eyes, and imagine.. License.. This work is licensed under a.. Creative Commons Attribution-NonCommercial-ShareAlike  ...   very much enjoying listening to them.. I really like the metro journey through Belleville.. They are so evocative and touching - they transport my imagination and I can.. see.. the places with my ears! The world is flooded with easily digested images, so it's great to hear something that sets your imagination racing in a way that an image can't.. For some reason my mind fills in the visual, it's a strange experience.. ".. B.. , UK..

    Original link path: /field_recordings.htm
    Open archive

  • Title: Contact - verot.net
    Descriptive info: For all contact :.. web@verot.. or you can.. send me a message from here.. To report an error on the website :.. webmaster@verot.. To ask something about the domain verot.. net :.. hostmaster@verot.. If you receive spam mails from verot.. abuse@verot.. My PGP key.. You can download my public PGP key.. If you want to help.. I spend quite a bit of time maintaining my free software code.. Want to help? You can donate.. on this page.. Right now, I am living there:.. where exactly?.. where is that?..

    Original link path: /contact.htm
    Open archive

  • Title: class.upload.php - verot.net
    Descriptive info: Overview.. Presentation.. Samples.. Download it!.. Download.. Translations.. Source.. Docs and support.. Documentation.. FAQ.. Forum.. Forum RSS.. News and updates.. Changelog.. News.. RSS.. Help out!.. Commercial licenses.. Donate!.. This PHP script uploads files and manipulates images very easily.. The perfect script to generate thumbnails or create a photo gallery! It can convert, resize and work on uploaded images in many ways, apply effects, add labels, watermarks and reflections and other image editing features.. You can use it for files uploaded through an HTML form, a Flash uploader, XMLHttpRequest or on local files.. It uses the GD library.. This script is released under the.. GPL Version 2.. , and has been downloaded in excess of 500 000 times in the last few years! If your project is not GPL,.. commercial licenses.. are available.. download.. demo.. license.. docs.. donate.. 32 released!.. Version 0.. 32 has been released, with.. new features.. and bug fixes.. Full support for XMLHttpRequest, ability to pixelate an image, etc.. Check out some demo samples.. What is it?.. An example will be more useful than any blurb I can write :.. $foo = new Upload($_FILES['form_field']); if ($foo->uploaded) { // save uploaded image with no changes $foo->Process('/home/user/files/'); if ($foo->processed) { echo 'original image copied'; } else { echo 'error : '.. $foo->error; } // save uploaded image with a new name $foo->file_new_name_body = 'foo'; $foo->Process('/home/user/files/'); if ($foo->processed) { echo 'image renamed "foo" copied'; } else { echo 'error : '.. $foo->error; } // save uploaded image with a new name, // resized to 100px wide $foo->file_new_name_body = 'image_resized'; $foo->image_resize = true; $foo->image_convert = gif; $foo->image_x = 100; $foo->image_ratio_y = true; $foo->Process('/home/user/files/'); if ($foo->processed) {  ...   when the uploaded file is not needed anymore, we can delete it using.. clean.. Why use this class?.. with one uploaded file, you can do as many copies, convertions, resizing you want.. you can resize each image dimension, or both, keeping the image ratio or not.. you can choose to resize an image only if it is bigger -or smaller- than the wanted sizes.. you can manipulate the image in many ways, play with colors, add borders, labels and watermarks.. its use is simplistic but powerful.. you can work on uploaded files or local files, useful for batch processing.. XMLHttpRequest and Flash uploads are fully supported.. MIME type detection is very comprehensive.. more than 60 documented configuration settings.. a lot of variables are set up during the process.. You can retrieve all these values after a process.. error messages are understandable, and a variable log allows you to see what the class does.. it is translated in more than 25 languages.. it is already widely used on Internet.. it is free :).. Is it out there on Internet?.. The class.. php source code has been downloaded well over.. 100 000 times.. just in the last three years.. It is also a key part of the popular.. K2 content component for Joomla!.. , downloaded over.. 500 000 times.. , and has been implemented in numerous CMS and frameworks!.. php is featured on.. HotScripts.. If you like the script, please rate it or write a review for it.. You can find it here :.. http://www.. hotscripts.. com/Detailed/45364.. html.. PHP Classes.. If you like the script, please rate it there.. phpclasses.. org/browse/package/2181.. Freshmeat.. http://freshmeat.. net/projects/class_upload_php/.. are available..

    Original link path: /php_class_upload.htm
    Open archive

  • Title: class.upload.php samples, a files uploading and images manipulation PHP class - verot.net
    Descriptive info: php samples, a files uploading and images manipulation PHP class.. These images are created by the.. test suite, that you can.. part of the package.. original file.. image/png - 150 x 100 - 35.. 25KB.. width 50, height auto.. image/png - 50 x 33 - 4.. 75KB.. $foo->image_resize = true; $foo->image_ratio_y = true; $foo->image_x = 50;.. height 50, width auto.. image/png - 75 x 50 - 10KB.. $foo->image_resize = true; $foo->image_ratio_x = true; $foo->image_y = 50;.. height 50, width 50.. image/png - 50 x 50 - 6.. $foo->image_resize = true; $foo->image_y = 50; $foo->image_x = 50;.. height 50, width 50, keeping ratio.. $foo->image_resize = true; $foo->image_ratio = true; $foo->image_y = 50; $foo->image_x = 50;.. 50x50, keeping ratio, cropping excedent.. $foo->image_resize = true; $foo->image_ratio_crop = true; $foo->image_y = 50; $foo->image_x = 50;.. 50x50, keeping ratio, cropping right excedent.. image/png - 50 x 50 - 7KB.. $foo->image_resize = true; $foo->image_ratio_crop = 'L'; $foo->image_y = 50; $foo->image_x = 50;.. 50x50, keeping ratio, cropping left excedent.. 5KB.. $foo->image_resize = true; $foo->image_ratio_crop = 'R'; $foo->image_y = 50; $foo->image_x = 50;.. 150x50, keeping ratio, filling in.. image/png - 150 x 50 - 10.. $foo->image_resize = true; $foo->image_ratio_fill = true; $foo->image_y = 50; $foo->image_x = 150;.. 150x50, keeping ratio, filling left side.. $foo->image_resize = true; $foo->image_ratio_fill = 'L'; $foo->image_y = 50; $foo->image_x = 150;.. 100x150, keeping ratio, filling top and bottom.. image/png - 100 x 150 - 15.. $foo->image_resize = true; $foo->image_ratio_fill = 'R'; $foo->image_y = 150; $foo->image_x = 100; $foo->image_background_color = '#FF00FF';.. height 50, width 50, cropped, using ratio_crop.. image/png - 30 x 50 - 4.. $foo->image_resize = true; $foo->image_ratio_crop = true; $foo->image_crop = '0 10'; $foo->image_y = 50; $foo->image_x = 50;.. calculates x and y, targeting 25000 pixels.. image/png - 194 x 129 - 52.. $foo->image_resize = true; $foo->image_ratio_pixels = 25000;.. calculates x and y, targeting 10000 pixels.. image/png - 122 x 82 - 23.. $foo->image_resize = true; $foo->image_ratio_pixels = 10000;.. 20% crop.. image/png - 90 x 60 - 12.. $foo->image_crop = '20%';.. 5px vertical and 20% horizontal crop.. image/png - 90 x 90 - 20KB.. $foo->image_crop = '5 20%';.. negative crop with a background color.. image/png - 180 x 106 - 34KB.. $foo->image_crop = '-3px -10%'; $foo->image_background_color = '#FF00FF';.. 5px top, 40px right, 10% bot.. and -20px left crop.. image/png - 130 x 85 - 24.. $foo->image_crop = '5 40 10% -20';.. 15px pre-cropping (before resizing 150 wide).. image/png - 150 x 88 - 27.. $foo->image_resize = true; $foo->image_ratio_y = true; $foo->image_x = 150; $foo->image_precrop = 15;.. diverse pre-cropping (before resizing 150 wide).. image/png - 150 x 98 - 26KB.. $foo->image_resize = true; $foo->image_ratio_y = true; $foo->image_x = 150; $foo->image_precrop = '25 70 10% -20';.. 90 degrees rotation.. image/png - 100 x 150 - 34.. $foo->image_rotate = '90';.. 180 degrees rotation.. $foo->image_rotate = '180';.. horizontal flip.. $foo->image_flip = 'H';.. vertical flip, into GIF file.. image/gif - 150 x 100 - 10.. $foo->image_convert = 'gif'; $foo->image_flip = 'V';.. 180 degrees rotation, into GIF, green bg.. image/x-ms-bmp - 150 x 100 - 44.. $foo- image_convert = 'gif'; $foo- image_default_color = '#00FF00'; $foo->image_rotate = '180';.. 90 degrees rotation and horizontal flip, into PNG.. $foo- image_convert = 'png'; $foo->image_flip = 'H'; $foo->image_rotate = '90';.. 20px black and white bevel.. image/png - 150 x 100 - 31KB.. $foo->image_bevel = 20; $foo->image_bevel_color1 = '#FFFFFF'; $foo->image_bevel_color2 = '#000000';.. 5px white bevel (smooth border).. image/png - 150 x 100 - 33.. $foo->image_bevel = 5; $foo->image_bevel_color1 = '#FFFFFF'; $foo->image_bevel_color2 = '#FFFFFF';.. 5px red border.. image/png - 160 x 110 - 35.. $foo->image_border = 5; $foo->image_border_color = '#FF0000';.. 5px green semi-transparent border.. $foo->image_border = 5; $foo->image_border_color = '#00FF00'; $foo->image_border_opacity = 50;.. 5px top, 20px right, 1px bot.. and 25% left blue border.. image/png - 207 x 106 - 35.. $foo->image_border = '5 20 1 25%'; $foo->image_border_color = '#0000FF';.. flat colored frame, 4 px wide.. image/png - 158 x 108 - 35.. $foo->image_frame = 1; $foo->image_frame_colors = '#FF0000 #FFFFFF #FFFFFF #0000FF';.. crossed colored frame, 7 px wide.. image/png - 164 x 114 - 35.. $foo->image_frame = 2; $foo->image_frame_colors = '#FFFFFF #BBBBBB #999999 #FF0000 #666666 #333333 #000000';.. flat colored frame, 4 px wide, 25% opacity.. $foo->image_frame = 1; $foo->image_frame_colors = '#FF0000 #FF00FF #0000FF #000000'; $foo->image_frame_opacity = 25;.. 10px fade-to-transparent border.. $foo->image_border_transparent = 10;.. various fade-to-transparent borders.. $foo->image_border_transparent = '10 50 20 60';.. right fading-out to transparency mask.. $foo->image_border_transparent = array(0, 150, 0, 0);.. tint and 50% overlay and  ...   $foo->image_text_background_opacity = 50; $foo->image_text_padding = 5;.. overlayed label with absolute negative position.. net'; $foo->image_text_opacity = 50; $foo->image_text_background = '#0000FF'; $foo->image_text_x = -5; $foo->image_text_y = -5; $foo->image_text_padding = 5;.. overlayed transparent label with absolute position.. image/png - 150 x 100 - 34KB.. net'; $foo->image_text_background = '#0000FF'; $foo->image_text_background_opacity = 25; $foo->image_text_x = 5; $foo->image_text_y = 5; $foo->image_text_padding = 20;.. text label with multiple lines and small font.. $foo->image_text = "verot.. net\nclass\nupload"; $foo->image_text_background = '#000000'; $foo->image_text_background_opacity = 75; $foo->image_text_font = 1; $foo->image_text_padding = 10;.. vertical multi-lines text, right aligned.. net\nclass\nupload"; $foo->image_text_color = '#000000'; $foo->image_text_background = '#FFFFFF'; $foo->image_text_background_opacity = 60; $foo->image_text_padding = 3; $foo->image_text_font = 3; $foo->image_text_alignment = 'R'; $foo->image_text_direction = 'V';.. text label with 10 pixels of line spacing.. image/png - 150 x 100 - 32KB.. net\nclass\nupload"; $foo->image_text_background = '#000000'; $foo->image_text_background_opacity = 50; $foo->image_text_padding = 10; $foo->image_text_x = -5; $foo->image_text_y = -5; $foo->image_text_line_spacing = 10;.. text label in a black line, plus unsharp mask.. image/png - 150 x 116 - 39.. $foo->image_unsharp = true; $foo- image_border = '0 0 16 0'; $foo- image_border_color = '#000000'; $foo- image_text = verot.. net ; $foo- image_text_font = 2; $foo- image_text_position = 'B'; $foo- image_text_padding_y = 2;.. using tokens in text labels.. image/png - 156 x 133 - 34.. $foo->image_crop = '-3 -3 -30 -3'; $foo->image_text = "[dst_name] [dst_x]x[dst_y]"; $foo->image_text_background = '#6666ff'; $foo->image_text_color = '#ffffff'; $foo->image_background_color= '#000099'; $foo->image_text_font = 2; $foo->image_text_y = -7; $foo->image_text_padding_x = 3; $foo->image_text_padding_y = 2;.. all the tokens available.. image/png - 180 x 355 - 37KB.. $foo->image_crop = '-15 -15 -240 -15'; $foo->image_text = "token value\n ------------- ------------------\n src_name [src_name]\n src_name_body [src_name_body]\n src_name_ext [src_name_ext]\n src_pathname [src_pathname]\n src_mime [src_mime]\n src_type [src_type]\n src_bits [src_bits]\n src_pixels [src_pixels]\n src_size [src_size]\n src_size_kb [src_size_kb]\n src_size_mb [src_size_mb]\n src_size_human [src_size_human]\n src_x [src_x]\n src_y [src_y]\n dst_path [dst_path]\n dst_name_body [dst_name_body]\n dst_name_ext [dst_name_ext]\n dst_name [dst_name]\n dst_pathname [dst_pathname]\n dst_x [dst_x]\n dst_y [dst_y]\n date [date]\n time [time]\n host [host]\n server [server]\n ip [ip]\n gd_version [gd_version]"; $foo->image_text_alignment = 'L'; $foo->image_text_font = 1; $foo->image_text_position = 'B'; $foo->image_text_padding_y = 5; $foo->image_text_color = '#000000';.. text label with external GDF font.. image/png - 150 x 100 - 21.. net\nclass\nupload"; $foo->image_text_background = '#000000'; $foo->image_text_padding = 10; $foo->image_text_font = "fonts/bmreceipt.. gdf"; $foo->image_text_line_spacing = 2;.. image/png - 150 x 100 - 24.. $foo->image_text = 'PHP'; $foo->image_text_color = '#FFFF00'; $foo->image_text_background = '#FF0000'; $foo->image_text_padding = 10; $foo->image_text_font = "fonts/atommicclock.. gdf";.. 40px reflection.. image/png - 150 x 142 - 48KB.. $foo->image_reflection_height = '40px';.. text label and 50% reflection.. image/png - 150 x 152 - 22.. net\nclass\nupload"; $foo->image_text_background = '#000000'; $foo->image_text_padding = 10; $foo->image_text_line_spacing = 10; $foo->image_reflection_height = '50%';.. 40px reflection and 10 pixels space, into JPEG.. image/jpeg - 150 x 150 - 8.. $foo- image_convert = 'jpg'; $foo->image_reflection_height = '40px'; $foo- image_reflection_space = 10;.. 60px reflection and -40 pixels space.. image/png - 150 x 120 - 45.. $foo->image_reflection_height = 60; $foo->image_reflection_space = -40;.. 50px reflection and 100% opacity.. image/png - 150 x 152 - 51.. $foo->image_reflection_height = 50; $foo->image_reflection_opacity = 100;.. 50px reflection and 20% opacity.. image/png - 150 x 152 - 50.. $foo->image_reflection_height = 50; $foo->image_reflection_opacity = 20;.. 50% reflection, black background.. $foo->image_reflection_height = '50%'; $foo->image_default_color = '#000000';.. 50% reflection, pink background, into GIF.. image/gif - 150 x 152 - 12.. $foo- image_convert = 'gif'; $foo->image_reflection_height = '50%'; $foo->image_default_color = '#000000';.. overlayed watermark (alpha transparent PNG).. $foo->image_watermark = 'watermark.. png';.. overlayed watermark, right position.. image/png - 150 x 100 - 36KB.. png'; $foo- image_watermark_position = 'R;.. watermark on greyscale pic, absolute position.. png'; $foo- image_watermark_x = 10; $foo- image_watermark_y = 10; $foo->image_greyscale = true;.. watermark, automatic up-resizing activated.. png'; $foo- image_watermark_no_zoom_in = false;.. large watermark automatically reduced (default).. $foo->image_watermark = 'watermark_large.. large watermark, automatic down-resizing deactivated.. png'; $foo- image_watermark_no_zoom_out = true;.. large watermark, down-resizing deactivated, position top-left.. png'; $foo- image_watermark_no_zoom_out = true; $foo- image_watermark_position = 'TL'.. large watermark automatically reduced, position 20 -20.. image/png - 150 x 100 - 36.. png'; $foo- image_watermark_x = 20; $foo- image_watermark_y = -20;.. desired JPEG size set to 3KB.. image/jpeg - 150 x 100 - 3KB.. $foo->image_convert = 'jpg'; $foo->jpeg_size = 3072;.. JPG quality set to 10%.. image/jpeg - 150 x 100 - 1.. $foo->image_convert = 'jpg'; $foo->jpeg_quality = 10;.. JPG quality set to 80%.. image/jpeg - 150 x 100 - 6KB.. $foo->image_convert = 'jpg'; $foo->jpeg_quality = 80;.. PNG compression set to 0 (fast, large files).. image/png - 150 x 100 - 58.. $foo->image_convert = 'jpg'; $foo->png_compression = 0;.. PNG compression set to 9 (slow, smaller files).. $foo->image_convert = 'jpg'; $foo->png_compression = 9;..

    Original link path: /php_class_upload_samples.htm
    Open archive

  • Title: class.upload.php changelog - verot.net
    Descriptive info: php changelog.. v 0.. 32.. 15/01/2013.. - add support for XMLHttpRequest uploads.. - added.. image_pixelate.. image_interlace.. png_compression.. to change PNG compressoin level.. - deactivate exec() if Suhosin is enabled.. - add more extension to dangerous scripts detection.. - imagejpeg takes null as second argument since PHP 5.. 4.. - default PECL Fileinfo MAGIC path to null.. - set gd.. jpeg_ignore_warning to true by default.. - fixed file name normalization.. 31.. 11/04/2011.. - added application/x-rar MIME type.. - make sure exec() and ini_get_all()function are not disabled if we want to use them.. - make sure that we don't divide by zero when calculating JPEG size.. -.. allowed.. forbidden.. can now accept strings.. - try to guess the file extension from the MIME type if there is no file extension.. - better class properties when changing the file extension.. file_force_extension.. to allow extension-less files if needed.. - better file safe conversion of the filename.. - allow shorthand byte values, such as 1K, 2M, 3G for.. file_max_size.. jpeg_size.. image_opacity.. to change picture opacity.. image_border_opacity.. to allow semi-transparent borders.. image_frame_opacity.. to allow semi-transparent frames.. image_border_transparent.. to allow borders fading to transparent.. - duplicated.. image_overlay_percent.. into.. image_overlay_opacity.. image_text_percent.. image_text_opacity.. image_text_background_percent.. image_text_background_opacity.. 30.. 05/09/2010.. - implemented an unsharp mask, with alpha transparency support, activated if.. image_unsharp.. is true.. added.. image_unsharp_amount.. image_unsharp_radius.. , and.. image_unsharp_threshold.. - added text/rtf MIME type, and no_script exception.. - corrected bug when.. no_script.. is activated and several process() are called.. - better error handling for finfo.. - display upload_max_filesize information from php.. ini in the log.. - automatic extension for extension-less images.. - fixed.. image_ratio_fill.. top and left filling.. - fixed alphablending issue when applying a transparent PNG watermark on a transparent PNG.. image_watermark_no_zoom_in.. image_watermark_no_zoom_out.. to allow the watermark to be resized down (or up) to fit in the image.. By default, the watermark may be resized down, but not up.. 29.. 03/02/2010.. - added protection against malicious images.. - added zip and torrent MIME type.. - replaced split() with explode().. - initialise image_dst_x/y with image_src_x/y.. - removed.. mime_fileinfo.. mime_file.. mime_magic.. mime_getimagesize.. from the docs since they are used before.. ().. - added more extensions and MIME types.. - improved MIME type validation.. - improved logging.. 28.. 10/08/2009.. - replaced ereg functions to be compatible with PHP 5.. 3.. - added flv MIME type.. - improved MIME type detection.. file_name_body_pre.. to prepend a string to the file name.. so that it is possible to deactivate some MIME type checking method.. - use exec() rather than shell_exec(), to play better with safe mode.. - added some error messages.. - fix bug when checking on conditions,.. processed.. wasn't propagated properly.. 27.. 14/05/2009.. - look for the language files directory from __FILE__.. - deactivate.. file_auto_rename.. if.. file_overwrite.. is set.. - improved transparency replacement for true color images.. - fixed calls to newer version of UNIX file utility.. - fixed error when using PECL Fileinfo extension in SAFE MODE, and when using the finfo class.. image_precrop.. to crop the image before an eventual resizing.. 26.. 13/11/2008.. - rewrote conversion from palette to true color to handle transparency better.. imagecopymergealpha().. when the overlayed image is of wrong dimensions.. imagecreatenew().. when the image to create have less than 1 pixels width or height.. - 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.. - added support for Flash uploaders.. - some bug fixing and error handling.. 25.. 17/11/2007.. - added translation files and mechanism to instantiate the class with a language different from English.. to set an array of forbidden MIME types.. - implemented support for simple wildcards in.. , such as image/*.. - preset the file extension to the desired conversion format when converting an image.. - added read and write support for BMP images.. - added a flag.. file_is_image.. to determine if the file is a supported image type.. - the class now provides some information about the image, before calling.. Available are.. image_src_x.. image_src_y.. and the newly  ...   for subsequent processes, and will be deleted upon calling clean().. 22.. 16/12/2006.. - added automatic creation of a temporary file if the upload directory is not within open_basedir.. - fixed a bug which was preventing to work on a local file by overwriting it with its processed copy.. - added MIME types.. video/x-ms-wmv.. image/x-png.. and fixed PNG support for IE weird MIME types.. - modified.. so it can accept one or more from string 'TBLR', determining which side of the image is kept while cropping.. - added support for multiple lines in the text, using "\n" as a line break.. image_text_line_spacing.. which allow to set the space between several lines of text.. image_text_alignment.. which allow to set the alignment when text has several lines.. image_text_font.. can now be set to the path of a GDF font to load external fonts.. image_reflection_height.. to create a reflection of the source image, which height is in pixels or percentage.. image_reflection_space.. to set the space in pixels between the source image and the reflection.. to set the reflection background color.. image_reflection_opacity.. to set the initial level of opacity of the reflection.. 21.. 30/09/2006.. which resizes within.. image_x.. image_y.. , keeping ratio, but filling the space by cropping excedent of image.. mime_check.. , which default is true, to set checks against.. MIME list.. - if MIME is empty, the class now triggers an error.. - color #000000 is OK for.. image_text_color.. , and related text transparency bug fixed.. gd_version.. () now uses gd_info(), or else phpinfo().. - fixed path issue when the destination path has no trailing slash on Windows systems.. - removed inline functions to be fully PHP5 compatible.. 20.. 11/08/2006.. - added some more error checking and messages (GD presence, permissions.. ).. - fix when uploading files without extension.. - changed values for.. image_brightness.. image_contrast.. to be between -127 and 127.. dir_auto_create.. to automatically and recursively create destination directory if missing.. dir_auto_chmod.. to automatically chmod the destination directory if not writeable.. dir_chmod.. to set the default chmod to use.. image_crop.. to crop images.. image_negative.. to invert the colors on the image.. image_greyscale.. to turn the image into greyscale.. image_threshold.. to apply a threshold filter on the image.. image_bevel.. image_bevel_color1.. image_bevel_color2.. to add a bevel border.. image_border.. image_border_color.. to add a single color border.. image_frame.. image_frame_colors.. to add a multicolored frame.. 19.. 29/03/2006.. - class is now compatible i18n (thanks Sylwester).. - the class can mow manipulate local files, not only uploaded files (instanciate the class with a local filename).. file_safe_name.. has been improved a bit.. image_tint_color.. image_overlay_color.. to do color manipulation on the images.. image_text.. and all derivated settings to add a text label on the image.. image_watermark.. and all derivated settings to add a watermark image on the image.. image_flip.. image_rotate.. for more image manipulations.. to calculate the JPG compression quality in order to fit within one filesize.. 18.. 02/02/2006.. to turn dangerous scripts into text files.. mime_magic_check.. to set the class to use mime_magic.. - fixed size and mime checking, wasn't working :/ Thanks Willem.. - fixed memory leak when resizing images.. - when resizing, it is not necessary anymore to set.. image_convert.. - il is now possible to simply convert an image, with no resizing.. - sets the default.. to upload_max_filesize from php.. ini.. Thanks Edward.. 17.. 28/05/2005.. - the class can be used with any version of GD.. - added security check on the file with a list of mime-types.. - changed the license to GPL v2 only.. 16.. 19/05/2005.. automatic file renaming if the same filename already exists.. safe formatting of the filename (spaces to _underscores so far).. - added some more error reporting to avoid crash if GD is not present.. 15.. 16/04/2005.. - added JPEG compression quality setting.. Thanks Vad.. 14.. 14/03/2005.. - reworked the class file to allow parsing with phpDocumentor.. 13.. 07/03/2005.. - fixed a bug with.. image_ratio.. Thanks Justin.. image_ratio_no_zoom_in.. image_ratio_no_zoom_out.. 12.. 21/01/2005.. to resize within max values, keeping image ratio.. 11.. 22/08/2003.. - update for GD2 (changed imageresized() into imagecopyresampled() and imagecreate() into imagecreatetruecolor())..

    Original link path: /php_class_upload_changelog.htm
    Open archive

  • Title: class.upload.php documentation - verot.net
    Descriptive info: php documentation.. Description.. Vars.. (.. details.. ) |.. Methods.. ).. What does it do?.. 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.. 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.. 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.. The class works with PHP 4 and 5, and its error messages can be localized at will.. 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).. 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.. Then you call the function.. 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.. You can repeat setting up a new set of processing variables, and calling.. again as many times as you want.. When you have finished, you can call.. to delete the original uploaded file.. If you don't set any processing parameters and call.. just after instanciating the class.. The uploaded file will be simply copied to the given location without any alteration or checks.. Don't forget to add.. enctype= multipart/form-data.. in your form tag form if you want your form to upload the file.. How to use it?.. Create a simple HTML file, with a form such as:.. form enctype="multipart/form-data" method="post" action="#" input type="file" size="32" name="image_field" value="" input type="submit" name="Submit" value="upload" /form.. Create a file called upload.. php:.. $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; } }.. How to process a file uploaded via XMLHttpRequest?.. Use the class as following, the rest being the same as above:.. $handle = new upload('php:'.. $_SERVER['HTTP_X_FILE_NAME']);.. Prefixing the argument with php: tells the class to retrieve the uploaded data in php://input, and the rest is the stream's filename, which is generally in $_SERVER['HTTP_X_FILE_NAME'].. But you can use any other name you see fit:.. $handle = new upload('php:mycustomname.. ext');.. How to process local files?.. $handle = new upload('/home/user/myfile.. jpg');.. How to set the language?.. Instantiate the class with a second argument being the language code:.. $handle = new upload($_FILES['image_field'], 'fr_FR'); $handle = new upload('/home/user/myfile.. jpg', 'fr_FR');.. How to output the resulting file or picture directly to the browser?.. Simply call.. () without an argument (or with null as first argument):.. $handle = new upload($_FILES['image_field']); header('Content-type: '.. $handle->file_src_mime); echo $handle->Process(); die();.. Or if you want to force the download of the file:.. $handle->file_src_mime); header("Content-Disposition: attachment; filename=".. rawurlencode($handle->file_src_name).. ";"); echo $handle->Process(); die();.. Processing parameters.. (reset after each process).. file_new_name_body.. replaces the name body (default: null).. $handle->file_new_name_body = 'new name';.. file_name_body_add.. appends to the name body (default: null).. $handle->file_name_body_add = '_uploaded';.. prepends to the name body (default: null).. $handle->file_name_body_pre = 'thumb_';.. file_new_name_ext.. replaces the file extension (default: null).. $handle->file_new_name_ext = 'txt';.. formats the filename (spaces changed to _) (default: true).. $handle->file_safe_name = true;.. forces an extension if there is't any (default: true).. $handle->file_force_extension = true;.. sets behaviour if file already exists (default: false).. $handle->file_overwrite = true;.. automatically renames file if it already exists (default: true).. $handle->file_auto_rename = true;.. automatically creates destination directory if missing (default: true).. $handle->auto_create_dir = true;.. automatically attempts to chmod the destination directory if not writeable (default: true).. $handle->dir_auto_chmod = true;.. chmod used when creating directory or if directory not writeable (default: 0777).. $handle->dir_chmod = 0777;.. sets maximum upload size (default: upload_max_filesize from php.. ini).. $handle->file_max_size = '1024'; // 1KB.. sets if the class check the MIME against the.. list (default: true).. $handle->mime_check = true;.. sets if the class turns scripts into text files (default: true).. $handle->no_script = false;.. array of allowed mime-types (or one string).. wildcard accepted, as in image/* (default: check Init).. $handle->allowed = array('application/pdf','application/msword', 'image/*');.. array of forbidden mime-types (or one string).. $handle->forbidden = array('application/*');.. if set, image will be converted (possible values : ''|'png'|'jpeg'|'gif'|'bmp'; default: '').. $handle->image_convert = 'jpg';.. if set, will forcibly fill transparent areas with the color, in hexadecimal (default: null).. $handle->image_background_color = '#FF00FF';.. fallback color background color for non alpha-transparent output formats, such as JPEG or BMP, in hexadecimal (default: #FFFFFF).. $handle->image_default_color = '#FF00FF';.. sets the compression level for PNG images, between 1 (fast but large files) and 9 (slow but smaller files) (default: null (Zlib default)).. $handle->png_compression = 9;.. jpeg_quality.. sets the compression quality for JPEG images (default: 85).. $handle->jpeg_quality = 50;.. if set to a size in bytes, will approximate.. so the output image fits within the size (default: null).. $handle->jpeg_size = 3072;.. if set to true, the image will be saved interlaced (default: false).. $handle->image_interlace = true;.. The following eight settings can be used to invalidate an upload if the file is an image (note that.. restrictions prevent the use of these settings).. if set to a dimension in pixels, the upload will be invalid if the image width is greater (default: null).. $handle->image_max_width = 200;.. if set to a dimension in pixels, the upload will be invalid if the image height is greater (default: null).. $handle->image_max_height = 100;.. if set to a number of pixels, the upload will be invalid if the image number of pixels is greater (default: null).. $handle->image_max_pixels = 50000;.. if set to a aspect ratio (width/height), the upload will be invalid if the image apect ratio is greater (default: null).. $handle->image_max_ratio = 1.. 5;.. if set to a dimension in pixels, the upload will be invalid if the image width is lower (default: null).. $handle->image_min_width = 100;.. if set to a dimension in pixels, the upload will be invalid if the image height is lower (default: null).. $handle->image_min_height = 500;.. if set to a number of pixels, the upload will be invalid if the image number of pixels is lower (default: null).. $handle->image_min_pixels = 20000;.. if set to a aspect ratio (width/height), the upload will be invalid if the image apect ratio is lower (default: null).. $handle->image_min_ratio = 0.. image_resize.. determines is an image will be resized (default: false).. $handle->image_resize = true;.. The following variables are used only if.. == true.. destination image width (default: 150).. $handle->image_x = 100;.. destination image height (default: 150).. $handle->image_y = 200;.. Use either one of the following.. if true, resize image conserving the original sizes ratio, using.. AND.. as max sizes if true (default: false).. $handle->image_ratio = true;.. 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).. $handle->image_ratio_crop = true;.. 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).. $handle->image_ratio_fill = true;.. same as.. , but won't resize if the source image is smaller than.. x.. (default: false).. $handle->image_ratio_no_zoom_in = true;.. , but won't resize if the source image is bigger than.. $handle->image_ratio_no_zoom_out = true;.. image_ratio_x.. if true, resize image, calculating.. from.. and conserving the original sizes ratio (default: false).. $handle->image_ratio_x = true;.. image_ratio_y.. $handle->image_ratio_y = true;.. if set to a long integer, resize image, calculating.. to match a the number of pixels (default: false).. $handle->image_ratio_pixels = 25000;.. The following image manipulations require GD2+.. if set, corrects the brightness.. value between -127 and 127 (default: null).. $handle->image_brightness = 40;.. if set, corrects the contrast.. $handle->image_contrast = 50;.. if set, changes the image opacity.. value between 0 and 100 (default: null).. $handle->image_opacity = 50;.. if set, will tint the image with a color, value as hexadecimal #FFFFFF (default: null).. $handle->image_tint_color = '#FF0000';.. if set, will add a colored overlay, value as hexadecimal #FFFFFF (default: null).. $handle->image_overlay_color = '#FF0000';.. used when.. is set, determines the opacity (default: 50).. $handle->image_overlay_opacity = 20;.. inverts the colors in the image (default: false).. $handle->image_negative = true;.. transforms an image into greyscale (default: false).. $handle->image_greyscale = true;.. applies a threshold filter.. $handle->image_threshold = 20;.. pixelate an image, value is block size (default: null).. $handle->image_pixelate = 10;.. applies an unsharp mask, with alpha transparency support (default: false).. $handle->image_unsharp = true;.. unsharp mask amount, typically 50 - 200 (default: 80).. $handle->image_unsharp_amount = 120;.. unsharp mask radius, typically 0.. 5 - 1 (default: 0.. 5).. $handle->image_unsharp_radius = 1;.. unsharp mask threshold, typically 0 - 5 (default: 1).. $handle->image_unsharp_threshold = 0;.. creates a text label on the image, value is a string, with eventual replacement tokens (default: null).. $handle->image_text = 'test';.. image_text_direction.. text label direction, either 'h' horizontal or 'v' vertical (default: 'h').. $handle->image_text_direction = 'v';.. text color for the text label, in hexadecimal (default: #FFFFFF).. $handle->image_text_color = '#FF0000';.. text opacity on the text label, integer between 0 and 100 (default: 100).. $handle->image_text_opacity = 50;.. image_text_background.. text label background color, in hexadecimal (default: null).. $handle->image_text_background = '#FFFFFF';.. text label background opacity, integer between 0 and 100 (default: 100).. $handle->image_text_background_opacity = 50;.. built-in font for the text label, from 1 to 5.. 1 is the smallest (default: 5).. $handle->image_text_font = 4;.. image_text_x.. absolute text label position, in pixels from the left border.. can be negative (default: null).. $handle->image_text_x = 5;.. image_text_y.. absolute text label position, in pixels from the top border.. $handle->image_text_y = 5;.. image_text_position.. text label position withing the image, a combination of one or two from 'TBLR': top, bottom, left, right (default: null).. $handle->image_text_position = 'LR';.. image_text_padding.. text label padding, in pixels.. can be overridden by.. image_text_padding_x.. image_text_padding_y.. (default: 0).. $handle->image_text_padding = 5;.. text label horizontal padding (default: null).. $handle->image_text_padding_x = 2;.. text label vertical padding (default: null).. $handle->image_text_padding_y = 10;.. text alignment when text has multiple lines, either 'L', 'C' or 'R' (default: 'C').. $handle->image_text_alignment = 'R';.. space between lines in pixels, when text has multiple lines (default: 0).. $handle->image_text_line_spacing = 3;.. flips image, wither 'h' horizontal or 'v' vertical (default: null).. $handle->image_flip = 'h';.. rotates image.. possible values are 90, 180 and 270 (default: null).. $handle->image_rotate = 90;.. 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).. $handle->image_crop = array(50,40,30,20); OR '-20 20%'.. crops image, before an eventual resizing.. $handle->image_precrop = array(50,40,30,20); OR '-20 20%'.. adds a bevel border to the image.. value is thickness in pixels (default: null).. $handle->image_bevel = 20;.. top and left bevel color, in hexadecimal (default: #FFFFFF).. $handle->image_bevel_color1 = '#FFFFFF';.. bottom and right bevel color, in hexadecimal (default: #000000).. $handle->image_bevel_color2 = '#000000';.. adds a unicolor border to the image.. $handle->image_border = '3px'; OR '-20 20%' OR array(3,2).. border color, in hexadecimal (default: #FFFFFF).. $handle->image_border_color = '#FFFFFF';.. border opacity, integer between 0 and 100 (default: 100).. $handle->image_border_opacity = 50;.. adds a fading-to-transparent border to the image.. $handle->image_border_transparent = '3px'; OR '-20 20%' OR array(3,2).. type of frame: 1=flat 2=crossed (default: null).. $handle->image_frame = 2;.. list of hex colors, in an array or a space separated string (default: '#FFFFFF #999999 #666666 #000000').. $handle->image_frame_colors = array('#999999', '#FF0000', '#666666', '#333333', '#000000');.. frame opacity, integer between 0 and 100 (default: 100).. $handle->image_frame_opacity = 50;.. adds a watermark on the image, value is a local filename.. accepted files are GIF, JPG, BMP, PNG and PNG alpha (default: null).. $handle->image_watermark = 'watermark.. image_watermark_x.. absolute watermark position, in pixels from the left border.. $handle->image_watermark_x = 5;.. image_watermark_y.. absolute watermark position, in pixels from the top border.. $handle->image_watermark_y = 5;.. image_watermark_position.. watermark position withing the image, a combination of one or two from 'TBLR': top, bottom, left, right (default: null).. $handle->image_watermark_position = 'LR';.. prevents the watermark to be resized up if it is smaller than the image (default: true).. $handle->image_watermark_no_zoom_in = false;.. prevents the watermark to be resized down if it is bigger than the image (default: false).. $handle->image_watermark_no_zoom_out = true;.. if set, a reflection will be added.. Format is either in pixels or percentage, such as 40, '40', '40px' or '40%' (default: null).. $handle->image_reflection_height = '25%';.. space in pixels between the source image and the reflection, can be negative (default: null).. $handle->image_reflection_space = 3;.. reflection background color, in hexadecimal.. Now deprecated in favor of.. (default: #FFFFFF).. $handle->image_default_color = '#000000';.. opacity level at which the reflection starts, integer between 0 and 100 (default: 60).. $handle->image_reflection_opacity = 60;.. Values that can be read before calling.. file_src_name.. Source file name.. file_src_name_body.. Source file name body.. file_src_name_ext.. Source file extension.. file_src_pathname.. Source file complete path and name.. file_src_mime.. Source file mime type.. file_src_size.. Source file size in bytes.. file_src_error..  ...   overlay on the image.. Value is an hexadecimal color, such as #FFFFFF.. To use with.. Sets the opacity for the colored overlay.. Default value is 50.. Soon to be deprecated old form of.. Pixelate an image.. Value is integer, represents the block size.. Crops an image, before an eventual resizing.. Set this variable to keep the original size ratio to fit within.. Default value is false.. The image will be resized as to fill the whole space, and excedent will be cropped.. 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.. it crops equally on both sides.. 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.. 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.. it fills the remaining space equally on both sides.. , but only if original image is bigger.. , but only if original image is smaller.. Set this variable to a number of pixels so that.. are the best match possible.. The image will be resized to have approximatively the number of pixels The aspect ratio wil be conserved.. Set this variable to calculate.. automatically , using.. and conserving ratio.. Sets the color of the reflection background (deprecated).. This setting is relevant only if.. This setting is now deprecated in favor of.. Sets the height of the reflection.. 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%'.. Default value is null, no reflection.. Sets the initial opacity of the reflection.. Value is an integer between 0 (no opacity) and 100 (full opacity).. The reflection will start from.. and end up at 0.. Default value is 60.. Sets the space between the source image and its relection.. Value is an integer in pixels, which can be negative.. Default value is 2.. Set this variable to true to resize the file if it is an image.. You will probably want to set.. , and maybe one of the ratio variables.. Default value is false (no resizing).. Rotates the image by increments of 45 degrees.. Value is either 90, 180 or 270.. Default value is null (no rotation).. Source image color depth.. Number of pixels.. Type of image (png, gif, jpg or bmp).. Source image width.. Source image height.. Adds a text label on the image.. Value is a string, any text.. Text will not word-wrap, although you can use breaklines in your text \n.. If set, this setting allow the use of all other settings starting with image_text_.. Replacement tokens can be used in the string:.. 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.. The tokens must be enclosed in square brackets: [dst_x] will be replaced by the width of the picture.. Sets the text alignment.. Value is a string, which can be either 'L', 'C' or 'R'.. Default value is 'C'.. This setting is relevant only if the text has several lines.. Sets the text background color for the text label.. Default value is null (no background).. Sets the text background opacity in the text label.. Sets the text color for the text label.. Default value is #FFFFFF (white).. Sets the text direction for the text label.. Default value is h (horizontal).. Sets the text font in the text label.. 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.. Default value is 5.. Sets the text line spacing.. Value is an integer, in pixels.. Default value is 0.. Sets the text opacity in the text label.. Sets the text label padding.. Value is in pixels, representing the distance between the text and the label background border.. This setting can be overriden by.. Sets the text label horizontal padding.. Value is in pixels, representing the distance between the text and the left and right label background borders.. If set, this setting overrides the horizontal part of.. Sets the text label vertical padding.. Value is in pixels, representing the distance between the text and the top and bottom label background borders.. If set, his setting overrides the vertical part of.. Sets the text label position within the image.. Value is one or two out of 'TBLR' (top, bottom, left, right).. The positions are as following:.. TL T TR L R BL B BR.. Default value is null (centered, horizontal and vertical).. Note that is.. are used, this setting has no effect.. Sets the text label absolute X position within the image.. 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.. Default value is null (so.. is used).. Sets the text label absolute Y position within the image.. 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.. Applies threshold filter.. Applies a tint on the image.. Transparent color in a palette.. Applies an unsharp mask, with alpha transparency support.. Beware that this unsharp mask is quite resource-intensive.. Sets the unsharp mask amount.. Value is an integer between 0 and 500, typically between 50 and 200.. Default value is 80.. Sets the unsharp mask radius.. Value is an integer between 0 and 50, typically between 0.. 5 and 1 It is not recommended to change it, the default works best.. From PHP 5.. 1, imageconvolution is used, and this setting has no effect.. 5.. Sets the unsharp mask threshold.. Value is an integer between 0 and 255, typically between 0 and 5.. Default value is 1.. Adds a watermark on the image.. Value is a local image filename, relative or absolute.. GIF, JPG, BMP and PNG are supported, as well as PNG alpha.. If set, this setting allow the use of all other settings starting with image_watermark_.. Prevents the watermark to be resized up if it is smaller than the image.. If the watermark if smaller than the destination image, taking in account the desired watermark position then it will be resized up to fill in the image (minus the.. values).. If you don't want your watermark to be resized in any way, then set.. to true If you want your watermark to be resized up or doan to fill in the image better, then set.. to false.. Default value is true (so the watermark will not be resized up, which is the behaviour most people expect).. Prevents the watermark to be resized down if it is bigger than the image.. If the watermark if bigger than the destination image, taking in account the desired watermark position then it will be resized down to fit in the image (minus the.. Default value is false (so the watermark may be shrinked to fit in the image).. Sets the watermarkposition within the image.. The positions are as following: TL T TR L R BL B BR.. Sets the watermark absolute X position within the image.. 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.. Sets the twatermark absolute Y position within the image.. 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.. Set this variable to the wanted (or maximum/minimum) width for the processed image, in pixels.. Default value is 150.. Set this variable to the wanted (or maximum/minimum) height for the processed image, in pixels.. Quality of JPEG created/converted destination image.. Default value is 85.. Determines the quality of the JPG image to fit a desired file size.. The JPG quality will be set between 1 and 100% The calculations are approximations.. Default value is null (no calculations).. Language selected for the translations.. By default, the language is english ( en_GB ).. Holds an HTML formatted log.. Set this variable to false if you don't want to check the MIME against the allowed list.. This variable is set to true by default for security reason.. Set this variable to false in the init() function if you don't want to check the MIME with UNIX file() command.. Set this variable to false in the init() function if you don't want to check the MIME with Fileinfo PECL extension.. On some systems, Fileinfo is known to be buggy, and you may want to deactivate it in the class code directly.. 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 the system's default If set to an empty string, it will call finfo_open without the path argument.. Set this variable to false in the init() function if you don't want to check the MIME with getimagesize().. 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.. Set this variable to false in the init() function if you don't want to check the MIME with the magic.. mime file.. The function mime_content_type() will be deprecated, and this variable will be set to false in a future release.. Set this variable to false if you don't want to turn dangerous scripts into simple text files.. Flag stopping PHP upload checks.. Indicates whether we instanciated the class with a filename, in which case we will not check on the validity of the PHP *upload*.. This flag is automatically set to true when working on a local file.. Warning: for uploads, this flag MUST be set to false for security reason.. Compression level for PNG images.. Between 1 (fast but large files) and 9 (slow but smaller files).. Default value is null (Zlib default).. Preserve transparency when resizing or converting an image (deprecated).. Default value is automatically set to true for transparent GIFs This setting is now deprecated.. Flag set after calling a process.. Indicates if the processing, and copy of the resulting file went OK.. Array of translated error messages.. By default, the language is english (en_GB) Translations can be in separate files, in a lang/ subdirectory.. Flag set after instanciating the class.. Indicates if the file has been uploaded properly.. Class version.. Deletes the uploaded file from its temporary location.. When PHP uploads a file, it stores it in a temporary location.. When you.. 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.. You might want not to use this function if you work on local files, as it will delete the source file.. clean.. Returns the version of GD.. return:.. GD version.. gdversion.. : Optional flag to get precise version.. Saves a BMP image.. This function has been published on the PHP website, and can be used freely.. imagebmp.. Opens a BMP image.. This function has been written by DHKold, and is used with permission of the author.. imagecreatefrombmp.. Actually uploads the file, and act on it according to the set processing class variables.. This function copies the uploaded file to the given location, eventually performing actions on it.. Typically, you can call.. 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.. several times.. You will be able to delete the uploaded file with.. when you have finished all your.. calls.. 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.. 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.. on the same uploaded file.. If the function is called with a null or empty argument, then it will return the content of the picture.. It will set.. (and.. error.. is an error occurred).. Optional content of the image.. process.. : Optional path location of the uploaded file, with an ending slash..

    Original link path: /php_class_upload_docs.htm
    Open archive


  • Archived pages: 528