Fifth pass at adding key files
This commit is contained in:
		
							
								
								
									
										1040
									
								
								site/retailers/phpthumb/docs/phpthumb.changelog.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1040
									
								
								site/retailers/phpthumb/docs/phpthumb.changelog.txt
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										203
									
								
								site/retailers/phpthumb/docs/phpthumb.faq.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										203
									
								
								site/retailers/phpthumb/docs/phpthumb.faq.txt
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,203 @@
 | 
			
		||||
//////////////////////////////////////////////////////////////
 | 
			
		||||
///  phpThumb() by James Heinrich <info@silisoftware.com>   //
 | 
			
		||||
//        available at http://phpthumb.sourceforge.net     ///
 | 
			
		||||
//////////////////////////////////////////////////////////////
 | 
			
		||||
///                                                         //
 | 
			
		||||
//    Frequently Asked Questions (FAQ) about phpThumb()     //
 | 
			
		||||
//                                                         ///
 | 
			
		||||
//////////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: My question isn't answered here and I can't find any
 | 
			
		||||
   forums, how do I get support?
 | 
			
		||||
A: Please email me directly at info@silisoftware.com with
 | 
			
		||||
   any questions, suggestions, donations, etc.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: What is the GPL? Can I use this for commercial sites?
 | 
			
		||||
A: See the GPL FAQ: http://www.gnu.org/licenses/gpl-faq.html
 | 
			
		||||
   In general, if you just want to call phpThumb.php in the
 | 
			
		||||
   standard <img src="phpThumb.php?src=pic.jpg&w=100"> manner
 | 
			
		||||
   then there is no problem, you're free to do this no matter
 | 
			
		||||
   if you site is commercial or not, or what license your code
 | 
			
		||||
   is released under.
 | 
			
		||||
   If you're calling phpThumb() as an object then you will
 | 
			
		||||
   probably run into license issues, so consult the above FAQ
 | 
			
		||||
   and the GPL itself.
 | 
			
		||||
   No matter if you use phpThumb() commercially or not, no
 | 
			
		||||
   payment is required. However, donations are always welcome
 | 
			
		||||
   and can be made at http://phpthumb.sourceforge.net
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: Some images generate thumbnails, but some fail (the original
 | 
			
		||||
   non-resized image is output instead).
 | 
			
		||||
A: Your PHP installation does not have a high enough memory_limit
 | 
			
		||||
   and ImageMagick is not installed on the server. The PHP memory
 | 
			
		||||
   required is 5 times the number of pixels in the image.
 | 
			
		||||
   For example:
 | 
			
		||||
     640x480x5   = 1.5MB
 | 
			
		||||
     1600x1200x5 = 9.2MB
 | 
			
		||||
   You can adjust the PHP memory limit in php.ini (if you have
 | 
			
		||||
   permission on your server to do so), or (better yet) install
 | 
			
		||||
   ImageMagick on the server and that will bypass the memory limit
 | 
			
		||||
   issue. If you can't do either of the above, you can resize the
 | 
			
		||||
   images manually (with your favourite image editor) to a size
 | 
			
		||||
   that your memory_limit setting can handle, and/or you can
 | 
			
		||||
   re-save the images with an image editor that can embed an EXIF
 | 
			
		||||
   thumbnail (Photoshop for example) which phpThumb can use as an
 | 
			
		||||
   image source (lower image quality, but perhaps better than
 | 
			
		||||
   nothing).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: I'm getting is this error message:
 | 
			
		||||
   Failed: RenderToFile(<filename>) failed because
 | 
			
		||||
   !is_resource($this->gdimg_output)
 | 
			
		||||
A: You missed the call to GenerateThumbnail() before
 | 
			
		||||
   RenderToFile() or OutputThumbnail.
 | 
			
		||||
   See /demo/phpThumb.demo.object.php for an example.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: I'm trying to save a phpThumb-generated image in Internet
 | 
			
		||||
   Explorer and it saves in BMP format, why?
 | 
			
		||||
A: This is not phpThumb's fault, it is an IE issue:
 | 
			
		||||
   http://support.microsoft.com/default.aspx?scid=kb;en-us;810978
 | 
			
		||||
   http://support.microsoft.com/default.aspx?scid=kb;en-us;260650
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: PNG images with transparent areas show up with gray background
 | 
			
		||||
   in the areas that are supposed to be transparent.
 | 
			
		||||
A: Internet Explorer has had a broken PNG alpha-channel display
 | 
			
		||||
   implementation for a decade, so it may never get fixed. Other
 | 
			
		||||
   major browsers generally handle alpha-transparent PNGs fine.
 | 
			
		||||
   See http://www.silisoftware.com/png_transparency/
 | 
			
		||||
   For an alpha-channel PNG display in IE hack, see this page:
 | 
			
		||||
   http://www.koivi.com/ie-png-transparency/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: I'm getting "<filename> does not exist" when I know the
 | 
			
		||||
   file does exist
 | 
			
		||||
A: Check these two values are present and properly configured
 | 
			
		||||
   in phpThumb.config.php (introduced in v1.6.0):
 | 
			
		||||
   $PHPTHUMB_CONFIG['allow_src_above_docroot']  (default=false)
 | 
			
		||||
   $PHPTHUMB_CONFIG['allow_src_above_phpthumb'] (default=true)
 | 
			
		||||
   If your images are outside DOCUMENT_ROOT then you will have
 | 
			
		||||
   to configure 'allow_src_above_docroot' to true.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: Should I use phpThumb.php, or use phpThumb() as an object?
 | 
			
		||||
A: phpThumb.php is easier to use (less coding) for basic uses.
 | 
			
		||||
   phpThumb.php handles all caching; your own object will need
 | 
			
		||||
   to have its own caching code. If you just want to display a
 | 
			
		||||
   thumbnailed version of an existing image, use phpThumb.php
 | 
			
		||||
   If you want to render one (or more) thumbnails to static
 | 
			
		||||
   files (during upload, for example), that's an appropriate
 | 
			
		||||
   use for the object mode. Also, phpThumb.config.php is only
 | 
			
		||||
   used by phpThumb.php, so if you instantiate your own object
 | 
			
		||||
   you need to manually set all configuration options because
 | 
			
		||||
   phpThumb.config.php has NO effect. So, to repeat:
 | 
			
		||||
   **always use phpThumb.php unless you NEED to have an object**
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: Are there any front-end GUI interfaces to phpThumb()?
 | 
			
		||||
A: See /demo/readme.demo.txt
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: Are there / have there been any security issues in phpThumb?
 | 
			
		||||
A: http://secunia.com/product/5199/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: Why can't Flash work with images output from phpThumb()?
 | 
			
		||||
A: Flash doesn't like progressive JPEG. Set:
 | 
			
		||||
   $PHPTHUMB_CONFIG['output_interlace'] = false;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: Image quality is not very good - why?
 | 
			
		||||
A: If you're using GD v1.x, no way around it. Upgrade to GD v2.x
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: Image quality is very bad, very pixelated -- why?
 | 
			
		||||
A: You may be trying to resize images larger than the available
 | 
			
		||||
   PHP memory, so phpThumb is simply extracting and using the
 | 
			
		||||
   EXIF thumbnail as the image source, which is usually about
 | 
			
		||||
   160x120 (so if you resize it to 640x480 it will look very bad).
 | 
			
		||||
   To calculate the required size for memory_limit in php.ini,
 | 
			
		||||
   calculate the number of pixels in the image and multiply by 5:
 | 
			
		||||
   For example, 1600x1200 = 1600 * 1200 * 5 = 9600000 = 10M
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: Can I save the generated thumbnail to a file?
 | 
			
		||||
A: Yes, there are several ways to do so; the best way is to call
 | 
			
		||||
   phpThumb as an object and call RenderToFile() to save the
 | 
			
		||||
   thumbnail to whatever filename you want.
 | 
			
		||||
   See /demo/phpThumb.demo.object.php for an example.
 | 
			
		||||
   The other way is to use the 'file' parameter (see
 | 
			
		||||
   /docs/phpthumb.readme.txt) but this parameter is deprecated
 | 
			
		||||
   and may not exist in future versions of phpThumb().
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: "Off-server thumbnailing is not allowed" -- how do I enable it?
 | 
			
		||||
A: By default, phpThumb() only makes thumbnails for the same domain
 | 
			
		||||
   that it is running on. To allow it to make thumbnails for a limited
 | 
			
		||||
   number of other domains, add them (in phpThumb.config.php) like this:
 | 
			
		||||
     $PHPTHUMB_CONFIG['nohotlink_valid_domains'] = array(
 | 
			
		||||
     	@$_SERVER['HTTP_HOST'], 'example.com', 'www.example.com',
 | 
			
		||||
     	'subdomain.example.net', 'example.org');
 | 
			
		||||
   To disable off-server thumbnail blocking, just set:
 | 
			
		||||
     $PHPTHUMB_CONFIG['nohotlink_enabled'] = false;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: Is it possible to set the parameters (like w/h/fltr[]) in the config,
 | 
			
		||||
   so that they can't be changed over the URL?
 | 
			
		||||
A: Take a look at $PHPTHUMB_DEFAULTS at the bottom of phpThumb.config.php
 | 
			
		||||
   You'll want to set $PHPTHUMB_DEFAULTS_GETSTRINGOVERRIDE=false,
 | 
			
		||||
   possibly also $PHPTHUMB_DEFAULTS_DISABLEGETPARAMS=true.
 | 
			
		||||
   You may also want to investigate $PHPTHUMB_CONFIG['high_security_enabled']
 | 
			
		||||
   (see the example at the bottom of phpThumb.config.php for how to call
 | 
			
		||||
   images in HighSecurity mode.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: Is there a way to use phpThumb() object to create thumbnails without the
 | 
			
		||||
   parameters in the URL showing the location of the image etc?
 | 
			
		||||
A: There is a demo in /demo/phpThumb.demo.object.php. You could modify this
 | 
			
		||||
   into your own file, but there still remains the problem of passing
 | 
			
		||||
   parameters to the file, whether it's phpThumb.php or your own instantiation
 | 
			
		||||
   of a phpThumb() object. I would suggest is putting as many of the common
 | 
			
		||||
   parameters into phpThumb.config.php as possible under $PHPTHUMB_DEFAULTS,
 | 
			
		||||
   so you then don't have to pass them for each image. If you don't want people
 | 
			
		||||
   modifying the parameters, turn on $PHPTHUMB_CONFIG['high_security_enabled']
 | 
			
		||||
   and set a password (you'll need to generate the <img> tags with phpThumbURL()
 | 
			
		||||
   provided at the bottom of phpThumb.config.php). If you don't want people
 | 
			
		||||
   accessing your source images at all, you can place them outside DOCUMENT_ROOT
 | 
			
		||||
   on your server (as long as phpThumb/PHP has read access to the directory).
 | 
			
		||||
   The other option is to put your source images in a MySQL database and set
 | 
			
		||||
   $PHPTHUMB_CONFIG['mysql_query'] and related parameters in phpThumb.config.php
 | 
			
		||||
   to pull your source images from the database. That way it's impossible to
 | 
			
		||||
   retrieve the images except through phpThumb.php, and if high_security is enabled,
 | 
			
		||||
   then nobody can modify the parameters to view anything except what you want to show.
 | 
			
		||||
   So, yes, it's possible to use your own object, but it's probably better to use
 | 
			
		||||
   phpThumb.php if possible -- one notable issue is that phpThumb.php handles all
 | 
			
		||||
   the caching, so you're on your own to deal with that if you create your own object.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: phpThumb runs slowly, as if the images aren't cached, when I use HTTP source
 | 
			
		||||
   images (not on my server). How can I make it go faster?
 | 
			
		||||
A: $PHPTHUMB_CONFIG['cache_source_filemtime_ignore_remote'] = true;
 | 
			
		||||
   // if true, remote source images will not be checked for modification date and
 | 
			
		||||
   // cached image will be used if available, even if source image is changed or removed
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: What does the "cache_default_only_suffix" configuration option do?
 | 
			
		||||
A: Cache files are normally created with big ugly names like
 | 
			
		||||
   "phpThumb_cache_www.example.com_src1a482c2c760463795ff18faf073b389f_par3e099041c2f4a73041a7f5d7e7fc481a_dat1119952152.jpeg"
 | 
			
		||||
   but if cache_default_only_suffix is enabled, cache filenames are simplified to
 | 
			
		||||
   "pic_thumb.jpg" (for example). The problem is that only one version of that
 | 
			
		||||
   thumbnail is possible, and you can never call it again with a different size,
 | 
			
		||||
   or different filters, etc.  Generally you don't want that enabled, but it's
 | 
			
		||||
   there because some people asked for it.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Q: Why is the visual size of rotated images smaller than the unrotated images?
 | 
			
		||||
A: phpThumb fits the rotated image into the 'w' and 'h' dimensions.
 | 
			
		||||
   Try not specifying a 'w' parameter: phpThumb.php?src=file.png&ra=15
 | 
			
		||||
   That should leave the image the apparent same size as the unrotated image
 | 
			
		||||
   (in actual fact the canvas size is enlarged to fit the rotated image in it).
 | 
			
		||||
							
								
								
									
										340
									
								
								site/retailers/phpthumb/docs/phpthumb.license.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										340
									
								
								site/retailers/phpthumb/docs/phpthumb.license.txt
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,340 @@
 | 
			
		||||
            GNU GENERAL PUBLIC LICENSE
 | 
			
		||||
               Version 2, June 1991
 | 
			
		||||
 | 
			
		||||
 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
 | 
			
		||||
              59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 | 
			
		||||
 Everyone is permitted to copy and distribute verbatim copies
 | 
			
		||||
 of this license document, but changing it is not allowed.
 | 
			
		||||
 | 
			
		||||
                Preamble
 | 
			
		||||
 | 
			
		||||
  The licenses for most software are designed to take away your
 | 
			
		||||
freedom to share and change it.  By contrast, the GNU General Public
 | 
			
		||||
License is intended to guarantee your freedom to share and change free
 | 
			
		||||
software--to make sure the software is free for all its users.  This
 | 
			
		||||
General Public License applies to most of the Free Software
 | 
			
		||||
Foundation's software and to any other program whose authors commit to
 | 
			
		||||
using it.  (Some other Free Software Foundation software is covered by
 | 
			
		||||
the GNU Library General Public License instead.)  You can apply it to
 | 
			
		||||
your programs, too.
 | 
			
		||||
 | 
			
		||||
  When we speak of free software, we are referring to freedom, not
 | 
			
		||||
price.  Our General Public Licenses are designed to make sure that you
 | 
			
		||||
have the freedom to distribute copies of free software (and charge for
 | 
			
		||||
this service if you wish), that you receive source code or can get it
 | 
			
		||||
if you want it, that you can change the software or use pieces of it
 | 
			
		||||
in new free programs; and that you know you can do these things.
 | 
			
		||||
 | 
			
		||||
  To protect your rights, we need to make restrictions that forbid
 | 
			
		||||
anyone to deny you these rights or to ask you to surrender the rights.
 | 
			
		||||
These restrictions translate to certain responsibilities for you if you
 | 
			
		||||
distribute copies of the software, or if you modify it.
 | 
			
		||||
 | 
			
		||||
  For example, if you distribute copies of such a program, whether
 | 
			
		||||
gratis or for a fee, you must give the recipients all the rights that
 | 
			
		||||
you have.  You must make sure that they, too, receive or can get the
 | 
			
		||||
source code.  And you must show them these terms so they know their
 | 
			
		||||
rights.
 | 
			
		||||
 | 
			
		||||
  We protect your rights with two steps: (1) copyright the software, and
 | 
			
		||||
(2) offer you this license which gives you legal permission to copy,
 | 
			
		||||
distribute and/or modify the software.
 | 
			
		||||
 | 
			
		||||
  Also, for each author's protection and ours, we want to make certain
 | 
			
		||||
that everyone understands that there is no warranty for this free
 | 
			
		||||
software.  If the software is modified by someone else and passed on, we
 | 
			
		||||
want its recipients to know that what they have is not the original, so
 | 
			
		||||
that any problems introduced by others will not reflect on the original
 | 
			
		||||
authors' reputations.
 | 
			
		||||
 | 
			
		||||
  Finally, any free program is threatened constantly by software
 | 
			
		||||
patents.  We wish to avoid the danger that redistributors of a free
 | 
			
		||||
program will individually obtain patent licenses, in effect making the
 | 
			
		||||
program proprietary.  To prevent this, we have made it clear that any
 | 
			
		||||
patent must be licensed for everyone's free use or not licensed at all.
 | 
			
		||||
 | 
			
		||||
  The precise terms and conditions for copying, distribution and
 | 
			
		||||
modification follow.
 | 
			
		||||
 | 
			
		||||
            GNU GENERAL PUBLIC LICENSE
 | 
			
		||||
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 | 
			
		||||
 | 
			
		||||
  0. This License applies to any program or other work which contains
 | 
			
		||||
a notice placed by the copyright holder saying it may be distributed
 | 
			
		||||
under the terms of this General Public License.  The "Program", below,
 | 
			
		||||
refers to any such program or work, and a "work based on the Program"
 | 
			
		||||
means either the Program or any derivative work under copyright law:
 | 
			
		||||
that is to say, a work containing the Program or a portion of it,
 | 
			
		||||
either verbatim or with modifications and/or translated into another
 | 
			
		||||
language.  (Hereinafter, translation is included without limitation in
 | 
			
		||||
the term "modification".)  Each licensee is addressed as "you".
 | 
			
		||||
 | 
			
		||||
Activities other than copying, distribution and modification are not
 | 
			
		||||
covered by this License; they are outside its scope.  The act of
 | 
			
		||||
running the Program is not restricted, and the output from the Program
 | 
			
		||||
is covered only if its contents constitute a work based on the
 | 
			
		||||
Program (independent of having been made by running the Program).
 | 
			
		||||
Whether that is true depends on what the Program does.
 | 
			
		||||
 | 
			
		||||
  1. You may copy and distribute verbatim copies of the Program's
 | 
			
		||||
source code as you receive it, in any medium, provided that you
 | 
			
		||||
conspicuously and appropriately publish on each copy an appropriate
 | 
			
		||||
copyright notice and disclaimer of warranty; keep intact all the
 | 
			
		||||
notices that refer to this License and to the absence of any warranty;
 | 
			
		||||
and give any other recipients of the Program a copy of this License
 | 
			
		||||
along with the Program.
 | 
			
		||||
 | 
			
		||||
You may charge a fee for the physical act of transferring a copy, and
 | 
			
		||||
you may at your option offer warranty protection in exchange for a fee.
 | 
			
		||||
 | 
			
		||||
  2. You may modify your copy or copies of the Program or any portion
 | 
			
		||||
of it, thus forming a work based on the Program, and copy and
 | 
			
		||||
distribute such modifications or work under the terms of Section 1
 | 
			
		||||
above, provided that you also meet all of these conditions:
 | 
			
		||||
 | 
			
		||||
    a) You must cause the modified files to carry prominent notices
 | 
			
		||||
    stating that you changed the files and the date of any change.
 | 
			
		||||
 | 
			
		||||
    b) You must cause any work that you distribute or publish, that in
 | 
			
		||||
    whole or in part contains or is derived from the Program or any
 | 
			
		||||
    part thereof, to be licensed as a whole at no charge to all third
 | 
			
		||||
    parties under the terms of this License.
 | 
			
		||||
 | 
			
		||||
    c) If the modified program normally reads commands interactively
 | 
			
		||||
    when run, you must cause it, when started running for such
 | 
			
		||||
    interactive use in the most ordinary way, to print or display an
 | 
			
		||||
    announcement including an appropriate copyright notice and a
 | 
			
		||||
    notice that there is no warranty (or else, saying that you provide
 | 
			
		||||
    a warranty) and that users may redistribute the program under
 | 
			
		||||
    these conditions, and telling the user how to view a copy of this
 | 
			
		||||
    License.  (Exception: if the Program itself is interactive but
 | 
			
		||||
    does not normally print such an announcement, your work based on
 | 
			
		||||
    the Program is not required to print an announcement.)
 | 
			
		||||
 | 
			
		||||
These requirements apply to the modified work as a whole.  If
 | 
			
		||||
identifiable sections of that work are not derived from the Program,
 | 
			
		||||
and can be reasonably considered independent and separate works in
 | 
			
		||||
themselves, then this License, and its terms, do not apply to those
 | 
			
		||||
sections when you distribute them as separate works.  But when you
 | 
			
		||||
distribute the same sections as part of a whole which is a work based
 | 
			
		||||
on the Program, the distribution of the whole must be on the terms of
 | 
			
		||||
this License, whose permissions for other licensees extend to the
 | 
			
		||||
entire whole, and thus to each and every part regardless of who wrote it.
 | 
			
		||||
 | 
			
		||||
Thus, it is not the intent of this section to claim rights or contest
 | 
			
		||||
your rights to work written entirely by you; rather, the intent is to
 | 
			
		||||
exercise the right to control the distribution of derivative or
 | 
			
		||||
collective works based on the Program.
 | 
			
		||||
 | 
			
		||||
In addition, mere aggregation of another work not based on the Program
 | 
			
		||||
with the Program (or with a work based on the Program) on a volume of
 | 
			
		||||
a storage or distribution medium does not bring the other work under
 | 
			
		||||
the scope of this License.
 | 
			
		||||
 | 
			
		||||
  3. You may copy and distribute the Program (or a work based on it,
 | 
			
		||||
under Section 2) in object code or executable form under the terms of
 | 
			
		||||
Sections 1 and 2 above provided that you also do one of the following:
 | 
			
		||||
 | 
			
		||||
    a) Accompany it with the complete corresponding machine-readable
 | 
			
		||||
    source code, which must be distributed under the terms of Sections
 | 
			
		||||
    1 and 2 above on a medium customarily used for software interchange; or,
 | 
			
		||||
 | 
			
		||||
    b) Accompany it with a written offer, valid for at least three
 | 
			
		||||
    years, to give any third party, for a charge no more than your
 | 
			
		||||
    cost of physically performing source distribution, a complete
 | 
			
		||||
    machine-readable copy of the corresponding source code, to be
 | 
			
		||||
    distributed under the terms of Sections 1 and 2 above on a medium
 | 
			
		||||
    customarily used for software interchange; or,
 | 
			
		||||
 | 
			
		||||
    c) Accompany it with the information you received as to the offer
 | 
			
		||||
    to distribute corresponding source code.  (This alternative is
 | 
			
		||||
    allowed only for noncommercial distribution and only if you
 | 
			
		||||
    received the program in object code or executable form with such
 | 
			
		||||
    an offer, in accord with Subsection b above.)
 | 
			
		||||
 | 
			
		||||
The source code for a work means the preferred form of the work for
 | 
			
		||||
making modifications to it.  For an executable work, complete source
 | 
			
		||||
code means all the source code for all modules it contains, plus any
 | 
			
		||||
associated interface definition files, plus the scripts used to
 | 
			
		||||
control compilation and installation of the executable.  However, as a
 | 
			
		||||
special exception, the source code distributed need not include
 | 
			
		||||
anything that is normally distributed (in either source or binary
 | 
			
		||||
form) with the major components (compiler, kernel, and so on) of the
 | 
			
		||||
operating system on which the executable runs, unless that component
 | 
			
		||||
itself accompanies the executable.
 | 
			
		||||
 | 
			
		||||
If distribution of executable or object code is made by offering
 | 
			
		||||
access to copy from a designated place, then offering equivalent
 | 
			
		||||
access to copy the source code from the same place counts as
 | 
			
		||||
distribution of the source code, even though third parties are not
 | 
			
		||||
compelled to copy the source along with the object code.
 | 
			
		||||
 | 
			
		||||
  4. You may not copy, modify, sublicense, or distribute the Program
 | 
			
		||||
except as expressly provided under this License.  Any attempt
 | 
			
		||||
otherwise to copy, modify, sublicense or distribute the Program is
 | 
			
		||||
void, and will automatically terminate your rights under this License.
 | 
			
		||||
However, parties who have received copies, or rights, from you under
 | 
			
		||||
this License will not have their licenses terminated so long as such
 | 
			
		||||
parties remain in full compliance.
 | 
			
		||||
 | 
			
		||||
  5. You are not required to accept this License, since you have not
 | 
			
		||||
signed it.  However, nothing else grants you permission to modify or
 | 
			
		||||
distribute the Program or its derivative works.  These actions are
 | 
			
		||||
prohibited by law if you do not accept this License.  Therefore, by
 | 
			
		||||
modifying or distributing the Program (or any work based on the
 | 
			
		||||
Program), you indicate your acceptance of this License to do so, and
 | 
			
		||||
all its terms and conditions for copying, distributing or modifying
 | 
			
		||||
the Program or works based on it.
 | 
			
		||||
 | 
			
		||||
  6. Each time you redistribute the Program (or any work based on the
 | 
			
		||||
Program), the recipient automatically receives a license from the
 | 
			
		||||
original licensor to copy, distribute or modify the Program subject to
 | 
			
		||||
these terms and conditions.  You may not impose any further
 | 
			
		||||
restrictions on the recipients' exercise of the rights granted herein.
 | 
			
		||||
You are not responsible for enforcing compliance by third parties to
 | 
			
		||||
this License.
 | 
			
		||||
 | 
			
		||||
  7. If, as a consequence of a court judgment or allegation of patent
 | 
			
		||||
infringement or for any other reason (not limited to patent issues),
 | 
			
		||||
conditions are imposed on you (whether by court order, agreement or
 | 
			
		||||
otherwise) that contradict the conditions of this License, they do not
 | 
			
		||||
excuse you from the conditions of this License.  If you cannot
 | 
			
		||||
distribute so as to satisfy simultaneously your obligations under this
 | 
			
		||||
License and any other pertinent obligations, then as a consequence you
 | 
			
		||||
may not distribute the Program at all.  For example, if a patent
 | 
			
		||||
license would not permit royalty-free redistribution of the Program by
 | 
			
		||||
all those who receive copies directly or indirectly through you, then
 | 
			
		||||
the only way you could satisfy both it and this License would be to
 | 
			
		||||
refrain entirely from distribution of the Program.
 | 
			
		||||
 | 
			
		||||
If any portion of this section is held invalid or unenforceable under
 | 
			
		||||
any particular circumstance, the balance of the section is intended to
 | 
			
		||||
apply and the section as a whole is intended to apply in other
 | 
			
		||||
circumstances.
 | 
			
		||||
 | 
			
		||||
It is not the purpose of this section to induce you to infringe any
 | 
			
		||||
patents or other property right claims or to contest validity of any
 | 
			
		||||
such claims; this section has the sole purpose of protecting the
 | 
			
		||||
integrity of the free software distribution system, which is
 | 
			
		||||
implemented by public license practices.  Many people have made
 | 
			
		||||
generous contributions to the wide range of software distributed
 | 
			
		||||
through that system in reliance on consistent application of that
 | 
			
		||||
system; it is up to the author/donor to decide if he or she is willing
 | 
			
		||||
to distribute software through any other system and a licensee cannot
 | 
			
		||||
impose that choice.
 | 
			
		||||
 | 
			
		||||
This section is intended to make thoroughly clear what is believed to
 | 
			
		||||
be a consequence of the rest of this License.
 | 
			
		||||
 | 
			
		||||
  8. If the distribution and/or use of the Program is restricted in
 | 
			
		||||
certain countries either by patents or by copyrighted interfaces, the
 | 
			
		||||
original copyright holder who places the Program under this License
 | 
			
		||||
may add an explicit geographical distribution limitation excluding
 | 
			
		||||
those countries, so that distribution is permitted only in or among
 | 
			
		||||
countries not thus excluded.  In such case, this License incorporates
 | 
			
		||||
the limitation as if written in the body of this License.
 | 
			
		||||
 | 
			
		||||
  9. The Free Software Foundation may publish revised and/or new versions
 | 
			
		||||
of the General Public License from time to time.  Such new versions will
 | 
			
		||||
be similar in spirit to the present version, but may differ in detail to
 | 
			
		||||
address new problems or concerns.
 | 
			
		||||
 | 
			
		||||
Each version is given a distinguishing version number.  If the Program
 | 
			
		||||
specifies a version number of this License which applies to it and "any
 | 
			
		||||
later version", you have the option of following the terms and conditions
 | 
			
		||||
either of that version or of any later version published by the Free
 | 
			
		||||
Software Foundation.  If the Program does not specify a version number of
 | 
			
		||||
this License, you may choose any version ever published by the Free Software
 | 
			
		||||
Foundation.
 | 
			
		||||
 | 
			
		||||
  10. If you wish to incorporate parts of the Program into other free
 | 
			
		||||
programs whose distribution conditions are different, write to the author
 | 
			
		||||
to ask for permission.  For software which is copyrighted by the Free
 | 
			
		||||
Software Foundation, write to the Free Software Foundation; we sometimes
 | 
			
		||||
make exceptions for this.  Our decision will be guided by the two goals
 | 
			
		||||
of preserving the free status of all derivatives of our free software and
 | 
			
		||||
of promoting the sharing and reuse of software generally.
 | 
			
		||||
 | 
			
		||||
                NO WARRANTY
 | 
			
		||||
 | 
			
		||||
  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
 | 
			
		||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
 | 
			
		||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
 | 
			
		||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
 | 
			
		||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 | 
			
		||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
 | 
			
		||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
 | 
			
		||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
 | 
			
		||||
REPAIR OR CORRECTION.
 | 
			
		||||
 | 
			
		||||
  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
 | 
			
		||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
 | 
			
		||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
 | 
			
		||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
 | 
			
		||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
 | 
			
		||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
 | 
			
		||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
 | 
			
		||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
 | 
			
		||||
POSSIBILITY OF SUCH DAMAGES.
 | 
			
		||||
 | 
			
		||||
             END OF TERMS AND CONDITIONS
 | 
			
		||||
 | 
			
		||||
        How to Apply These Terms to Your New Programs
 | 
			
		||||
 | 
			
		||||
  If you develop a new program, and you want it to be of the greatest
 | 
			
		||||
possible use to the public, the best way to achieve this is to make it
 | 
			
		||||
free software which everyone can redistribute and change under these terms.
 | 
			
		||||
 | 
			
		||||
  To do so, attach the following notices to the program.  It is safest
 | 
			
		||||
to attach them to the start of each source file to most effectively
 | 
			
		||||
convey the exclusion of warranty; and each file should have at least
 | 
			
		||||
the "copyright" line and a pointer to where the full notice is found.
 | 
			
		||||
 | 
			
		||||
    <one line to give the program's name and a brief idea of what it does.>
 | 
			
		||||
    Copyright (C) <year>  <name of author>
 | 
			
		||||
 | 
			
		||||
    This program is free software; you can redistribute it and/or modify
 | 
			
		||||
    it under the terms of the GNU General Public License as published by
 | 
			
		||||
    the Free Software Foundation; either version 2 of the License, or
 | 
			
		||||
    (at your option) any later version.
 | 
			
		||||
 | 
			
		||||
    This program is distributed in the hope that it will be useful,
 | 
			
		||||
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
    GNU General Public License for more details.
 | 
			
		||||
 | 
			
		||||
    You should have received a copy of the GNU General Public License
 | 
			
		||||
    along with this program; if not, write to the Free Software
 | 
			
		||||
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Also add information on how to contact you by electronic and paper mail.
 | 
			
		||||
 | 
			
		||||
If the program is interactive, make it output a short notice like this
 | 
			
		||||
when it starts in an interactive mode:
 | 
			
		||||
 | 
			
		||||
    Gnomovision version 69, Copyright (C) year name of author
 | 
			
		||||
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
 | 
			
		||||
    This is free software, and you are welcome to redistribute it
 | 
			
		||||
    under certain conditions; type `show c' for details.
 | 
			
		||||
 | 
			
		||||
The hypothetical commands `show w' and `show c' should show the appropriate
 | 
			
		||||
parts of the General Public License.  Of course, the commands you use may
 | 
			
		||||
be called something other than `show w' and `show c'; they could even be
 | 
			
		||||
mouse-clicks or menu items--whatever suits your program.
 | 
			
		||||
 | 
			
		||||
You should also get your employer (if you work as a programmer) or your
 | 
			
		||||
school, if any, to sign a "copyright disclaimer" for the program, if
 | 
			
		||||
necessary.  Here is a sample; alter the names:
 | 
			
		||||
 | 
			
		||||
  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
 | 
			
		||||
  `Gnomovision' (which makes passes at compilers) written by James Hacker.
 | 
			
		||||
 | 
			
		||||
  <signature of Ty Coon>, 1 April 1989
 | 
			
		||||
  Ty Coon, President of Vice
 | 
			
		||||
 | 
			
		||||
This General Public License does not permit incorporating your program into
 | 
			
		||||
proprietary programs.  If your program is a subroutine library, you may
 | 
			
		||||
consider it more useful to permit linking proprietary applications with the
 | 
			
		||||
library.  If this is what you want to do, use the GNU Library General
 | 
			
		||||
Public License instead of this License.
 | 
			
		||||
							
								
								
									
										527
									
								
								site/retailers/phpthumb/docs/phpthumb.readme.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										527
									
								
								site/retailers/phpthumb/docs/phpthumb.readme.txt
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,527 @@
 | 
			
		||||
//////////////////////////////////////////////////////////////
 | 
			
		||||
///  phpThumb() by James Heinrich <info@silisoftware.com>   //
 | 
			
		||||
//        available at http://phpthumb.sourceforge.net     ///
 | 
			
		||||
//////////////////////////////////////////////////////////////
 | 
			
		||||
///                                                         //
 | 
			
		||||
//       This code is released under the GNU GPL:           //
 | 
			
		||||
//         http://www.gnu.org/copyleft/gpl.html             //
 | 
			
		||||
//                                                          //
 | 
			
		||||
//    +-----------------------------------------------+     //
 | 
			
		||||
//    | phpThumb() is free to use according to the    |     //
 | 
			
		||||
//    | terms of the GPL. Donations also gratefully   |     //
 | 
			
		||||
//    | GPL FAQ: http://gnu.org/licenses/gpl-faq.html |     //
 | 
			
		||||
//    |                                               |     //
 | 
			
		||||
//    | Donations are gratefully accepted from happy  |     //
 | 
			
		||||
//    | users :)  See http://phpthumb.sourceforge.net |     //
 | 
			
		||||
//    |                                               |     //
 | 
			
		||||
//    | If you like phpThumb(), please consider       |     //
 | 
			
		||||
//    | writing a review at HotScripts.com:           |     //
 | 
			
		||||
//    | http://www.hotscripts.com/Detailed/25654.html |     //
 | 
			
		||||
//    |                                               |     //
 | 
			
		||||
//    | If you do use this code somewhere, send me    |     //
 | 
			
		||||
//    | an email and tell me how/where you used it.   |     //
 | 
			
		||||
//    +-----------------------------------------------+     //
 | 
			
		||||
//                                                         ///
 | 
			
		||||
//////////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
============
 | 
			
		||||
Description:
 | 
			
		||||
============
 | 
			
		||||
 | 
			
		||||
phpThumb() uses the GD library to create thumbnails from
 | 
			
		||||
images (GIF, PNG or JPEG) on the fly. The output size is
 | 
			
		||||
configurable (can be larger or smaller than the source),
 | 
			
		||||
and the source may be the entire image or only a portion
 | 
			
		||||
of the original image. True color and resampling is used
 | 
			
		||||
if GD v2.0+ is available, otherwise low-color and simple
 | 
			
		||||
resizing is used. Source image can be a physical file on
 | 
			
		||||
the server or can be retrieved from a database. GIFs are
 | 
			
		||||
supported on all versions of GD even if GD does not have
 | 
			
		||||
native GIF support thanks to the GIFutil class by Fabien
 | 
			
		||||
Ezber. AntiHotlinking feature prevents other people from
 | 
			
		||||
using your server to resize their thumbnails, or link to
 | 
			
		||||
your  images  from  another  server.  The  cache feature
 | 
			
		||||
reduces server load.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
======
 | 
			
		||||
Usage:
 | 
			
		||||
======
 | 
			
		||||
 | 
			
		||||
Call phpThumb() just like you would a normal image.
 | 
			
		||||
Examples:
 | 
			
		||||
 <IMG SRC="phpThumb.php?src=/image.jpg&w=100">
 | 
			
		||||
 <IMG SRC="phpThumb.php?src=http://example.com/foo.jpg">
 | 
			
		||||
See the "demo" link on http://phpthumb.sourceforge.net
 | 
			
		||||
for more usage examples). Parameters that can be passed
 | 
			
		||||
are listed below under "URL Parameters".
 | 
			
		||||
 | 
			
		||||
NOTE: It's recommended you use the local image filename
 | 
			
		||||
wherever possible (rather than http://) because performance
 | 
			
		||||
is much better, less (or no) use of temp files, and the
 | 
			
		||||
last-modified check for cached files doesn't work for
 | 
			
		||||
remote files.
 | 
			
		||||
 | 
			
		||||
To access files over a LAN with Windows share names you
 | 
			
		||||
must use the network name (or IP) and not a mapped drive
 | 
			
		||||
name, for example:
 | 
			
		||||
  //othercomputer/file.jpg - good
 | 
			
		||||
  //192.168.2.1/file.jpg - good
 | 
			
		||||
  z:/file.jpg - won't work
 | 
			
		||||
This is a PHP limitation (see www.php.net/file-exists)
 | 
			
		||||
Note: you may want to use "/" slashes instead of "\" if
 | 
			
		||||
you have magic_quotes_gpc enabled to avoid stripslashes
 | 
			
		||||
problems, although either slash should work if
 | 
			
		||||
magic_quotes_gpc is disabled
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
================================
 | 
			
		||||
Alternate PATH_INFO-style Usage:
 | 
			
		||||
================================
 | 
			
		||||
 | 
			
		||||
phpThumb.php can also be called by passing parameters not
 | 
			
		||||
after the usual "?" but like this:
 | 
			
		||||
  phpThumb.php/<params>=<values>;<w>x<h>;<image>
 | 
			
		||||
For example:
 | 
			
		||||
  phpThumb.php/100;pic.jpg
 | 
			
		||||
  phpThumb.php/100;images/pic.jpg
 | 
			
		||||
  phpThumb.php/100;/images/pic.jpg
 | 
			
		||||
  phpThumb.php/100x200;pic.jpg
 | 
			
		||||
  phpThumb.php/x200;pic.jpg
 | 
			
		||||
  phpThumb.php/f=jpeg;q=50;100x200;pic.jpg
 | 
			
		||||
  phpThumb.php/fltr[]=usm;100;pic.jpg
 | 
			
		||||
 | 
			
		||||
<image> must be the last item. Dimensions must be the second-
 | 
			
		||||
last item. As many key/value pairs for parameters can be
 | 
			
		||||
passed before those last two items, with each pair joined by
 | 
			
		||||
equals ("=") and seperated by semicolon (";")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
==============
 | 
			
		||||
Configuration:
 | 
			
		||||
==============
 | 
			
		||||
 | 
			
		||||
There are some configuration options you may (but are
 | 
			
		||||
not required to) change. Most configuration options can
 | 
			
		||||
be set when you call phpThumb() - see list below), but
 | 
			
		||||
default configuration options (such as cache directory)
 | 
			
		||||
are in phpThumb.config.php - this is the only file you
 | 
			
		||||
should ever modify.
 | 
			
		||||
 | 
			
		||||
The configuration file is distributed as
 | 
			
		||||
phpThumb.config.php.default to prevent accidental
 | 
			
		||||
overwriting of old configuration settings. Please
 | 
			
		||||
migrate your old settings to the new file (if upgrading),
 | 
			
		||||
or delete your old config and rename the default to
 | 
			
		||||
phpThumb.config.php
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
The amount of memory required for phpThumb depends on
 | 
			
		||||
several factors: the dimensions of the source image,
 | 
			
		||||
the dimensions of the output image, whether unsharp
 | 
			
		||||
masking is applied, whether watermarks are applied, etc.
 | 
			
		||||
The auto-detection of memory limits works as a general
 | 
			
		||||
"safe" value. You may be able to exceed the auto value
 | 
			
		||||
by a small or large amount, depending on whether you
 | 
			
		||||
apply watermarks and/or sharpening, and the output size
 | 
			
		||||
of your thumbnails. I do not currently have a reliable
 | 
			
		||||
formula for calculating such things, but I will attempt
 | 
			
		||||
to craft one for future versions of phpThumb(). Until
 | 
			
		||||
then, set "max_source_pixels" in phpThumb.config.php to a
 | 
			
		||||
value that works well for you (or leave it alone if the
 | 
			
		||||
defaults give you no problems).
 | 
			
		||||
 | 
			
		||||
The configuration options you should maybe modify are:
 | 
			
		||||
* cache_directory - thumbnailing is slow and processor-
 | 
			
		||||
    intensive. Enabling caching will dramatically speed
 | 
			
		||||
    up future thumbnail serving
 | 
			
		||||
* max_source_pixels - This should be auto-detected, but
 | 
			
		||||
    if auto-detection fails and you get an invalid image
 | 
			
		||||
    from large source images, set this to about 20% of
 | 
			
		||||
    your available PHP memory limit.
 | 
			
		||||
* imagemagick_path - If the source image is larger than
 | 
			
		||||
    max_source_pixels allows, but ImageMagick is available
 | 
			
		||||
    phpThumb() will use it to generate the thumbnail.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///////////////////////////////////////////////////////////
 | 
			
		||||
Note: High-Security mode is recommended enabled if possible.
 | 
			
		||||
  Set $PHPTHUMB_CONFIG['high_security_enabled'] in
 | 
			
		||||
  phpThumb.config.php to enable it. Each call to phpThumb
 | 
			
		||||
  needs to be made through the function supplied at the
 | 
			
		||||
  bottom of phpThumb.config.php which create the hash:
 | 
			
		||||
    require_once('phpThumb.config.php');
 | 
			
		||||
    echo '<img src="'.phpThumbURL('src=pic.jpg&w=50').'">';
 | 
			
		||||
///////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
==============================================
 | 
			
		||||
Calling as an object (not using phpThumb.php):
 | 
			
		||||
==============================================
 | 
			
		||||
 | 
			
		||||
NOTE: most people don't need to and should not do this.
 | 
			
		||||
If you just want to display resized images, please just
 | 
			
		||||
use phpThumb.php, not the object mode. To render output
 | 
			
		||||
to one (or more) files instead of the browser, you should
 | 
			
		||||
skip phpThumb.php and instantiate your own object. Please
 | 
			
		||||
take a look at /demo/phpThumb.demo.object.php for details.
 | 
			
		||||
 | 
			
		||||
Note: phpThumb.php is where the caching code is located, if
 | 
			
		||||
  you instantiate your own phpThumb() object that code is
 | 
			
		||||
  bypassed and it's up to you to handle the reading and
 | 
			
		||||
  writing of cached files.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
===============
 | 
			
		||||
URL Parameters:
 | 
			
		||||
===============
 | 
			
		||||
 | 
			
		||||
 src = filename of source image
 | 
			
		||||
 new = create new image, not thumbnail of existing image.
 | 
			
		||||
       Requires "w" and "h" parameters set.
 | 
			
		||||
       [ex: &new=FF0000|75] - red background, 75% opacity
 | 
			
		||||
       Set to hex color string of background. Opacity is
 | 
			
		||||
       optional (defaults to 100% opaque).
 | 
			
		||||
   w = max width of output thumbnail in pixels
 | 
			
		||||
   h = max height of output thumbnail in pixels
 | 
			
		||||
  wp = max width for portrait images
 | 
			
		||||
  hp = max height for portrait images
 | 
			
		||||
  wl = max width for landscape images
 | 
			
		||||
  hl = max height for landscape images
 | 
			
		||||
  ws = max width for square images
 | 
			
		||||
  hs = max height for square images
 | 
			
		||||
   f = output image format ("jpeg", "png", or "gif")
 | 
			
		||||
   q = JPEG compression (1=worst, 95=best, 75=default)
 | 
			
		||||
  sx = left side of source rectangle (default = 0)
 | 
			
		||||
       (values 0 < sx < 1 represent percentage)
 | 
			
		||||
  sy = top side of source rectangle (default = 0)
 | 
			
		||||
       (values 0 < sy < 1 represent percentage)
 | 
			
		||||
  sw = width of source rectangle (default = fullwidth)
 | 
			
		||||
       (values 0 < sw < 1 represent percentage)
 | 
			
		||||
  sh = height of source rectangle (default = fullheight)
 | 
			
		||||
       (values 0 < sh < 1 represent percentage)
 | 
			
		||||
  zc = zoom-crop. Will auto-crop off the larger dimension
 | 
			
		||||
       so that the image will fill the smaller dimension
 | 
			
		||||
       (requires both "w" and "h"). Set "zc=1" to enable.
 | 
			
		||||
       (overrides both "iar" and "far")
 | 
			
		||||
  bg = background hex color (default = FFFFFF)
 | 
			
		||||
  bc = border hex color (default = 000000)
 | 
			
		||||
fltr = filter system. Call as an array as follows:
 | 
			
		||||
       - "brit" (Brightness) [ex: &fltr[]=brit|<value>]
 | 
			
		||||
         where <value> is the amount +/- to adjust brightness
 | 
			
		||||
         (range -255 to 255)
 | 
			
		||||
         Availble in PHP5 with bundled GD only.
 | 
			
		||||
       - "cont" (Constrast) [ex: &fltr[]=cont|<value>]
 | 
			
		||||
         where <value> is the amount +/- to adjust contrast
 | 
			
		||||
         (range -255 to 255)
 | 
			
		||||
         Availble in PHP5 with bundled GD only.
 | 
			
		||||
       - "gam" (Gamma Correction) [ex: &fltr[]=gam|<value>]
 | 
			
		||||
         where <value> can be a number >0 to 10+ (default 1.0)
 | 
			
		||||
         Must be >0 (zero gives no effect). There is no max,
 | 
			
		||||
         although beyond 10 is pretty useless. Negative
 | 
			
		||||
         numbers actually do something, maybe not quite the
 | 
			
		||||
         desired effect, but interesting nonetheless.
 | 
			
		||||
       - "sat" (SATuration) [ex: &fltr[]=sat|<value>]
 | 
			
		||||
         where <value> is a number between zero (no change)
 | 
			
		||||
         and -100 (complete desaturation = grayscale), or it
 | 
			
		||||
         can be any positive number for increased saturation.
 | 
			
		||||
       - "ds" (DeSaturate) [ex: &fltr[]=ds|<value>]
 | 
			
		||||
         is an alias for "sat" except values are inverted
 | 
			
		||||
         (positive values remove color, negative values boost
 | 
			
		||||
         saturation)
 | 
			
		||||
       - "gray" (Grayscale) [ex: &fltr[]=gray]
 | 
			
		||||
         remove all color from image, make it grayscale
 | 
			
		||||
       - "th" (Threshold) [ex: &fltr[]=th|<value>]
 | 
			
		||||
         makes image greyscale, then sets all pixels brighter
 | 
			
		||||
         than <value> (range 0-255) to white, and all pixels
 | 
			
		||||
         darker than <value> to black
 | 
			
		||||
       - "rcd" (Reduce Color Depth) [ex: &fltr[]=rcd|<c>|<d>]
 | 
			
		||||
         where <c> is the number of colors (2-256) you want
 | 
			
		||||
         in the output image, and <d> is "1" for dithering
 | 
			
		||||
         (deault) or "0" for no dithering
 | 
			
		||||
       - "clr" (Colorize) [ex: &fltr[]=clr|<value>|<color>]
 | 
			
		||||
         where <value> is a number between 0 and 100 for the
 | 
			
		||||
         amount of colorization, and <color> is the hex color
 | 
			
		||||
         to colorize to.
 | 
			
		||||
       - "sep" (Sepia) [ex: &fltr[]=sep|<value>|<color>]
 | 
			
		||||
         where <value> is a number between 0 and 100 for the
 | 
			
		||||
         amount of colorization (default=50), and <color> is
 | 
			
		||||
         the hex color to colorize to (default=A28065).
 | 
			
		||||
         Note: this behaves differently when applied by
 | 
			
		||||
         ImageMagick, in which case 80 is default, and lower
 | 
			
		||||
         values give brighter/yellower images and higher
 | 
			
		||||
         values give darker/bluer images
 | 
			
		||||
       - "usm" (UnSharpMask) [ex: &fltr[]=usm|<a>|<r>|<t>]
 | 
			
		||||
         where <a> is the amount (default = 80), <r> is the
 | 
			
		||||
         radius (default = 0.5), <t> is the threshold
 | 
			
		||||
         (default = 3).
 | 
			
		||||
       - "blur" (Blur) [ex: &fltr[]=blur|<radius>]
 | 
			
		||||
         where (0 < <radius> < 25) (default = 1)
 | 
			
		||||
       - "gblr" (Gaussian Blur) [ex: &fltr[]=gblr]
 | 
			
		||||
         Availble in PHP5 with bundled GD only.
 | 
			
		||||
       - "sblr" (Selective Blur) [ex: &fltr[]=gblr]
 | 
			
		||||
         Availble in PHP5 with bundled GD only.
 | 
			
		||||
       - "smth" (Smooth) [ex: &fltr[]=smth|<value>]
 | 
			
		||||
         where <value> is the weighting value for the matrix
 | 
			
		||||
         (range -10 to 10, default 6)
 | 
			
		||||
         Availble in PHP5 with bundled GD only.
 | 
			
		||||
       - "lvl" (Levels) [ex: &fltr[]=lvl|<channel>|<min>|<max>
 | 
			
		||||
         where <channel> can be one of 'r', 'g', 'b', 'a' (for
 | 
			
		||||
         Red, Green, Blue, Alpha respectively), or '*' for all
 | 
			
		||||
         channels based on average grayscale value (default).
 | 
			
		||||
         <min> and <max> are the clip points for the levels
 | 
			
		||||
         and are set to clip 0.1% of each end by default.
 | 
			
		||||
         (range = 0-255) and are set to clip 0.1% of each end
 | 
			
		||||
         by default. Use -1 for min and/or max to invoke auto-
 | 
			
		||||
         detect mode. Using default parameters (&fltr[]=lvl)
 | 
			
		||||
         is similar to Auto Contrast in Adobe Photoshop.
 | 
			
		||||
       - "wb" (White Balance) [ex: &fltr[]=wb|<c>]
 | 
			
		||||
         where <c> is the target hex color to white balance
 | 
			
		||||
         on, this color is what "should be" white, or light
 | 
			
		||||
         gray. The filter attempts to maintain brightness so
 | 
			
		||||
         any gray color can theoretically be used. If <c> is
 | 
			
		||||
         omitted the filter guesses based on brightest pixels
 | 
			
		||||
         in each of RGB
 | 
			
		||||
       - "hist" (Histogram)
 | 
			
		||||
         [ex: &fltr[]=hist|<b>|<c>|<w>|<h>|<a>|<o>|<m>]
 | 
			
		||||
         Where <b> is the color band(s) to display, from back
 | 
			
		||||
         to front (one or more of "rgba*" for Red Green Blue
 | 
			
		||||
         Alpha and Grayscale respectively);
 | 
			
		||||
         <c> is a semicolon-seperated list of hex colors to
 | 
			
		||||
         use for each graph band (defaults to FF0000, 00FF00,
 | 
			
		||||
         0000FF, 999999, FFFFFF respectively);
 | 
			
		||||
         <w> and <h> are the width and height of the overlaid
 | 
			
		||||
         histogram in pixels, or if <= 1 then percentage of
 | 
			
		||||
         source image width/height;
 | 
			
		||||
         <a> is the alignment (same as for "wmi" and "wmt");
 | 
			
		||||
         <o> is opacity from 0 (transparent) to 100 (opaque)
 | 
			
		||||
             (requires PHP v4.3.2, otherwise 100% opaque);
 | 
			
		||||
         <m> is the edge (and inter-tile) margin in percent
 | 
			
		||||
       - "over" (OVERlay/underlay image) overlays an image on
 | 
			
		||||
         the thumbnail, or overlays the thumbnail on another
 | 
			
		||||
         image (to create a picture frame for example)
 | 
			
		||||
         [ex: &fltr[]=over|<i>|<u>|<m>|<o>]
 | 
			
		||||
         where <i> is the image filename; <u> is "0" (default)
 | 
			
		||||
         for overlay the image on top of the thumbnail or "1"
 | 
			
		||||
         for overlay the thumbnail on top of the image; <m> is
 | 
			
		||||
         the margin - can be absolute pixels, or if < 1 is a
 | 
			
		||||
         percentage of the thumbnail size [must be < 0.5]
 | 
			
		||||
         (default is 0 for overlay and 10% for underlay);
 | 
			
		||||
         <o> is opacity (0 = transparent, 100 = opaque)
 | 
			
		||||
             (requires PHP v4.3.2, otherwise 100% opaque);
 | 
			
		||||
         (thanks raynerape<70>gmail*com, shabazz3<7A>msu*edu)
 | 
			
		||||
       - "wmi" (WaterMarkImage)
 | 
			
		||||
         [ex: &fltr[]=wmi|<f>|<a>|<o>|<m>] where
 | 
			
		||||
         <f> is the filename of the image to overlay;
 | 
			
		||||
         <a> is the alignment (one of BR, BL, TR, TL, C,
 | 
			
		||||
             R, L, T, B, *) where B=bottom, T=top, L=left,
 | 
			
		||||
             R=right, C=centre, *=tile);
 | 
			
		||||
         <o> is opacity from 0 (transparent) to 100 (opaque)
 | 
			
		||||
             (requires PHP v4.3.2, otherwise 100% opaque);
 | 
			
		||||
         <m> is the edge (and inter-tile) margin in percent
 | 
			
		||||
       - "wmt" (WaterMarkText)
 | 
			
		||||
         [ex: &fltr[]=wmt|<t>|<s>|<a>|<c>|<f>|<o>|<m>|<n>|<b>|<O>|<x>]
 | 
			
		||||
         where:
 | 
			
		||||
         <t> is the text to use as a watermark;
 | 
			
		||||
             Any instance of metacharacters will be replaced
 | 
			
		||||
             with their calculated value. Currently supported:
 | 
			
		||||
               ^Fb = source image filesize in bytes
 | 
			
		||||
               ^Fk = source image filesize in kilobytes
 | 
			
		||||
               ^Fm = source image filesize in megabytes
 | 
			
		||||
               ^X  = source image width in pixels
 | 
			
		||||
               ^Y  = source image height in pixels
 | 
			
		||||
               ^x  = thumbnail width in pixels
 | 
			
		||||
               ^y  = thumbnail height in pixels
 | 
			
		||||
               ^^  = the character ^
 | 
			
		||||
         <s> is the font size (1-5 for built-in font, or point
 | 
			
		||||
           size for TrueType fonts);
 | 
			
		||||
         <a> is the alignment (one of BR, BL, TR, TL, C, R, L,
 | 
			
		||||
           T, B, * where B=bottom, T=top, L=left, R=right,
 | 
			
		||||
           C=centre, *=tile);
 | 
			
		||||
         <c> is the hex color of the text;
 | 
			
		||||
         <f> is the filename of the TTF file (optional, if
 | 
			
		||||
           omitted a built-in font will be used);
 | 
			
		||||
         <o> is opacity from 0 (transparent) to 100 (opaque)
 | 
			
		||||
             (requires PHP v4.3.2, otherwise 100% opaque);
 | 
			
		||||
         <m> is the edge (and inter-tile) margin in percent;
 | 
			
		||||
         <n> is the angle
 | 
			
		||||
         <b> is the hex color of the background;
 | 
			
		||||
         <O> is background opacity from 0 (transparent) to
 | 
			
		||||
             100 (opaque)
 | 
			
		||||
             (requires PHP v4.3.2, otherwise 100% opaque);
 | 
			
		||||
         <x> is the direction(s) in which the background is
 | 
			
		||||
             extended (either 'x' or 'y' (or both, but both
 | 
			
		||||
             will obscure entire image))
 | 
			
		||||
             Note: works with TTF fonts only, not built-in
 | 
			
		||||
         (thanks mail<69>mmjaeger*com, craig<69>pc-fanatics*com)
 | 
			
		||||
       - "flip" [ex: &fltr[]=flip|x   or   &fltr[]=flip|y]
 | 
			
		||||
         flip image on X or Y axis
 | 
			
		||||
       - "ric" [ex: &fltr[]=ric|<x>|<y>]
 | 
			
		||||
         rounds off the corners of the image (to transparent
 | 
			
		||||
         for PNG output), where <x> is the horizontal radius
 | 
			
		||||
         of the curve and <y> is the vertical radius
 | 
			
		||||
       - "elip" [ex: &fltr[]=elip]
 | 
			
		||||
         similar to rounded corners but more extreme
 | 
			
		||||
       - "mask" [ex: &fltr[]=mask|filename.png]
 | 
			
		||||
         greyscale values of mask are applied as the alpha
 | 
			
		||||
         channel to the main image. White is opaque, black
 | 
			
		||||
         is transparent.
 | 
			
		||||
       - "bvl" (BeVeL) [ex: &fltr[]=bvl|<w>|<c1>|<c2>]
 | 
			
		||||
         where <w> is the bevel width, <c1> is the hex color
 | 
			
		||||
         for the top and left shading, <c2> is the hex color
 | 
			
		||||
         for the bottom and right shading
 | 
			
		||||
       - "bord" (BORDer) [ex: &fltr[]=bord|<w>|<rx>|<ry>|<c>
 | 
			
		||||
         where <w> is the width in pixels, <rx> and <ry> are
 | 
			
		||||
         horizontal and vertical radii for rounded corners,
 | 
			
		||||
         and <c> is the hex color of the border
 | 
			
		||||
       - "fram" (FRAMe) draws a frame, similar to "bord" but
 | 
			
		||||
         more configurable
 | 
			
		||||
         [ex: &fltr[]=fram|<w1>|<w2>|<c1>|<c2>|<c3>]
 | 
			
		||||
         where <w1> is the width of the main border, <w2> is
 | 
			
		||||
         the width of each side of the bevel part, <c1> is the
 | 
			
		||||
         hex color of the main border, <c2> is the highlight
 | 
			
		||||
         bevel color, <c3> is the shadow bevel color
 | 
			
		||||
       - "drop" (DROP shadow)
 | 
			
		||||
         [ex: &fltr[]=drop|<d>|<w>|<clr>|<a>]
 | 
			
		||||
         where <d> is distance from image to shadow, <w> is
 | 
			
		||||
         width of shadow fade (not yet implemented), <clr> is
 | 
			
		||||
         the hex color of the shadow, and <a> is the angle of
 | 
			
		||||
         the shadow (default=225)
 | 
			
		||||
file = if set then thumbnail will be rendered to this
 | 
			
		||||
       filename, not output and not cached.
 | 
			
		||||
       (Deprecated. Disabled by default since v1.6.0.
 | 
			
		||||
       You should instantiate your own object instead)
 | 
			
		||||
goto = URL to redirect to after rendering image to file
 | 
			
		||||
       * Must begin with "http://"
 | 
			
		||||
       * Requires file parameter set
 | 
			
		||||
       (Deprecated. Disabled by default since v1.6.0.
 | 
			
		||||
       You should instantiate your own object instead)
 | 
			
		||||
 err = custom error image filename instead of showing
 | 
			
		||||
       error messages (for use on production sites)
 | 
			
		||||
md5s = MD5 hash of the source image -- if this parameter is
 | 
			
		||||
       passed with the hash of the source image then the
 | 
			
		||||
       source image is not checked for existance or
 | 
			
		||||
       modification and the cached file is used (if
 | 
			
		||||
       available). If 'md5s' is passed an empty string then
 | 
			
		||||
       phpThumb.php dies and outputs the correct MD5 hash
 | 
			
		||||
       value.  This parameter is the single-file equivalent
 | 
			
		||||
       of 'cache_source_filemtime_ignore_*' configuration
 | 
			
		||||
       paramters
 | 
			
		||||
 xto = EXIF Thumbnail Only - set to only extract EXIF
 | 
			
		||||
       thumbnail and not do any additional processing
 | 
			
		||||
  ra = Rotate by Angle: angle of rotation in degrees
 | 
			
		||||
       positive = counterclockwise, negative = clockwise
 | 
			
		||||
  ar = Auto Rotate: set to "x" to use EXIF orientation
 | 
			
		||||
       stored by camera. Can also be set to "l" or "L"
 | 
			
		||||
       for landscape, or "p" or "P" for portrait. "l"
 | 
			
		||||
       and "P" rotate the image clockwise, "L" and "p"
 | 
			
		||||
       rotate the image counter-clockwise.
 | 
			
		||||
 aoe = Output Allow Enlarging - override the setting for
 | 
			
		||||
       $CONFIG['output_allow_enlarging'] (1=on, 0=off)
 | 
			
		||||
       ("far" and "iar" both override this and allow output
 | 
			
		||||
       larger than input)
 | 
			
		||||
 iar = Ignore Aspect Ratio - disable proportional resizing
 | 
			
		||||
       and stretch image to fit "h" & "w" (which must both
 | 
			
		||||
       be set).  (1=on, 0=off)  (overrides "far")
 | 
			
		||||
 far = Force Aspect Ratio - image will be created at size
 | 
			
		||||
       specified by "w" and "h" (which must both be set).
 | 
			
		||||
       Alignment: L=left,R=right,T=top,B=bottom,C=center
 | 
			
		||||
       BL,BR,TL,TR use the appropriate direction if the
 | 
			
		||||
       image is landscape or portrait.
 | 
			
		||||
maxb = MAXimum Byte size - output quality is auto-set to
 | 
			
		||||
       fit thumbnail into "maxb" bytes  (compression
 | 
			
		||||
       quality is adjusted for JPEG, bit depth is adjusted
 | 
			
		||||
       for PNG and GIF)
 | 
			
		||||
down = filename to save image to. If this is set the
 | 
			
		||||
       browser will prompt to save to this filename rather
 | 
			
		||||
       than display the image
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
==============
 | 
			
		||||
General Notes:
 | 
			
		||||
==============
 | 
			
		||||
 | 
			
		||||
* Always use the local image filename wherever possible
 | 
			
		||||
  rather than a full http:// URL because performance is
 | 
			
		||||
  much better, less (or no) use of temp files, and the
 | 
			
		||||
  last-modified check for cached files doesn't work for
 | 
			
		||||
  remote files. For example:
 | 
			
		||||
   good: phpThumb.php?src=/images/nicepic.jpg
 | 
			
		||||
    bad: phpThumb.php?src=/home/httpd/example/images/nicepic.jpg
 | 
			
		||||
  worse: phpThumb.php?src=http://example.com/images/nicepic.jpg
 | 
			
		||||
 | 
			
		||||
* Thumbnails will be scaled proportionately to fit in a
 | 
			
		||||
  box of at most (width * height) pixels
 | 
			
		||||
  (unless "iar" is set)
 | 
			
		||||
 | 
			
		||||
* Thumbnail caching for URL or database sources requires
 | 
			
		||||
  an absolute directory name for $config_cache_directory
 | 
			
		||||
  Physical file cached thumbnails will be recreated if
 | 
			
		||||
  the source file changes, but remote/database files
 | 
			
		||||
  cannot (modification time isn't readily available)
 | 
			
		||||
 | 
			
		||||
* If you need a GUI interface to phpThumb(), or for a user
 | 
			
		||||
  to specify crop settings, or something like that please
 | 
			
		||||
  see the list of known programs in /demo/readme.demos.txt
 | 
			
		||||
 | 
			
		||||
* Cropping images can be specified with either exact pixel
 | 
			
		||||
  values for sx/sy/sw/sh parameters, or if those are set
 | 
			
		||||
  to a value >0 and <1 then these are interpreted as a
 | 
			
		||||
  percentage of the source image width/height. For example,
 | 
			
		||||
  to crop 25% off all sides, you would specify parameters:
 | 
			
		||||
  phpThumb.php?src=pic.jpg&sx=.25&sy=.25&sw=.5&sh=.5
 | 
			
		||||
 | 
			
		||||
* phpThumb() may have tempfile access issues on servers
 | 
			
		||||
  where Safe Mode is enabled, specificly when accessing
 | 
			
		||||
  a file over HTTP, or when a non-bundled version of GD
 | 
			
		||||
  is in use. Specifying "config_temp_directory" may help
 | 
			
		||||
 | 
			
		||||
* Properly resolving /~user/ style filenames requires
 | 
			
		||||
  apache_lookup_uri(), which is missing or broken in
 | 
			
		||||
  Apache2, or if PHP is not installed as an Apache module.
 | 
			
		||||
  phpThumb() does try and work around this if it is
 | 
			
		||||
  unavailble, but you may have to specify a full filename
 | 
			
		||||
  for "src" if you encounter problems.
 | 
			
		||||
 | 
			
		||||
* phpThumb() should work with PHP v4.0.6+, but seems to
 | 
			
		||||
   have a few quirks before v4.1.0
 | 
			
		||||
  EXIF thumbnail extraction requires PHP v4.2.0+
 | 
			
		||||
  Image rotation requires PHP v4.3.0+. There have been
 | 
			
		||||
    reports of problems with PHP older than v4.3.3
 | 
			
		||||
  Some image filters require PHP v5.0.0+
 | 
			
		||||
  Run /demo/phpThumb.demo.check.php to examine your server
 | 
			
		||||
 | 
			
		||||
* phpThumb() works better and faster when ImageMagick is
 | 
			
		||||
  available. Most functions will work with only GD2, but
 | 
			
		||||
  speed is much faster with ImageMagick, and much larger
 | 
			
		||||
  images can be processed with ImageMagick than GD.
 | 
			
		||||
 | 
			
		||||
* phpThumb() works with GD v1.x, but works better with
 | 
			
		||||
   GD v2.0+ because of the true-color image support
 | 
			
		||||
   and ImageCopyResampled(). Also, there appears to be a
 | 
			
		||||
   bug in ImageCopyResized() which is used with GD v1.x
 | 
			
		||||
   where the bottom and/or right line of pixels is set
 | 
			
		||||
   to the background color (due to a rounding error?)
 | 
			
		||||
  NOTE: Please use the bundled version of GD if at all
 | 
			
		||||
   possible (with PHP v4.3.0+) because the non-bundled
 | 
			
		||||
   version has bugs which may cause PHP to crash:
 | 
			
		||||
   * http://bugs.php.net/bug.php?id=21518
 | 
			
		||||
   * http://bugs.php.net/bug.php?id=24174
 | 
			
		||||
   phpThumb() has a workaround for the above bug but
 | 
			
		||||
   there may be other bugs, and the workaround is slow.
 | 
			
		||||
  Alpha transparent output requires GD >= 2.0.1 and
 | 
			
		||||
   PHP >= 4.3.2
 | 
			
		||||
  Most (if not all) filters require GD v2.x to function
 | 
			
		||||
   at all. But many filters can be handled by ImageMagick
 | 
			
		||||
   instead of GD.
 | 
			
		||||
 | 
			
		||||
* Filters handled by ImageMagick or GD:
 | 
			
		||||
  - brit;cont;ds;sat;gray;clr;sep;gam;neg;th;rcd;flip;edge;
 | 
			
		||||
    emb;lvl;blur;gblr;usm;
 | 
			
		||||
* Filters handled only by ImageMagick:
 | 
			
		||||
  - none yet
 | 
			
		||||
* Filters handled only by GD + PHP5:
 | 
			
		||||
  - sblr;mean;smth;
 | 
			
		||||
* Filters handled only by GD2:
 | 
			
		||||
  - bvl;wmi;wmt;over;wb;hist;fram;drop;mask;elip;ric;bord;
 | 
			
		||||
		Reference in New Issue
	
	Block a user