//////////////////////////////////////////////////////////////
///  phpThumb() by James Heinrich <info@silisoftware.com>   //
//        available at http://phpthumb.sourceforge.net     ///
//////////////////////////////////////////////////////////////
///                                                         //
//    Frequently Asked Questions (FAQ) about phpThumb()     //
//                                                         ///
//////////////////////////////////////////////////////////////


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: Are there any front-end GUI interfaces to phpThumb()?
A: See /demo/readme.demo.txt


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

