This is a demo of phpThumb() (current version: v1.7.3-200607111933)
Other phpThumb() demos are also available.

Note: this server is working on GD "bundled (2.0.34 compatible)", so images should be of optimal quality.

phpThumb.demo.showpic.php demo here
Difference between GD1 and GD2

The following images have the textured background behind them to illustrate transparency effects. Note that some browsers, notably Internet Explorer, are incapable of displaying alpha-channel PNGs. See my page on the PNG transparency problem. Other modern browsers such as Mozilla/Firefox display alpha-transparent PNGs with no problems.

#0
<img src="../phpThumb.php">phpThumb version



#1
<img src="../phpThumb.php?src=images/disk.jpg&w=200">width=200px



#2
<img src="../phpThumb.php?src=images/disk.jpg&w=200&q=10">width=200px, JPEGquality=10%



#3
<img src="../phpThumb.php?src=images/watermark.png&w=400&aoe=1&bg=ffffff">width=400px, AllowOutputEnlargement enabled



#4
<img src="../phpThumb.php?src=images/disk.jpg&w=250&sx=600&sy=5&sw=100&sh=100&aoe=1">section from (600x5 - 700x105) cropped and enlarged by 250%, AllowOutputEnlargement enabled



#5
<img src="../phpThumb.php?src=http%3A%2F%2Fsilisoftware.com%2Fimages%2FSiliSoft.gif&w=100">HTTP source image
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#6
<img src="../phpThumb.php?src=images/disk.jpg&w=200&fltr[]=wmi|images/watermark.png|BL">width=200px, watermark (bottom-left, 75% opacity)
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#7
<img src="../phpThumb.php?src=images/disk.jpg&w=200&fltr[]=wmi|images/watermark.png|*|25">width=200px, watermark (tiled, 25% opacity)
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#8
<img src="../phpThumb.php?src=images/watermark.png&bg=00FFFF&f=png"> <img src="../phpThumb.php?src=images/watermark.png&bg=00FFFF&f=gif"> <img src="../phpThumb.php?src=images/watermark.png&bg=00FFFF&f=jpeg">source image (GIF) transpancy with transparent output (PNG, GIF) vs. specified background color (JPEG)



#9
<img src="../phpThumb.php?src=images/animaple.gif"> <img src="../phpThumb.php?src=images/animaple.gif&w=25&f=gif"> <img src="../phpThumb.php?src=images/animaple.gif&w=25&f=png"> <img src="../phpThumb.php?src=images/animaple.gif&w=25&f=ico"> <img src="../phpThumb.php?src=images/animaple.gif&w=25&f=bmp"> <img src="../phpThumb.php?src=images/animaple.gif&w=25&f=jpeg">resize animated GIF. Notice how output format affects the result: GIF is animated and transparent; PNG and ICO are tranparent but not animated (first frame is rendered as a still image); JPEG and BMP are neither transparent nor animated. Any filters will disable animated resizing (may be fixed in a future version).

(requires ImageMagick, this server is running "ImageMagick 6.7.6-8 2016-07-19 Q16" so it will work)



#10
<img src="../phpThumb.php?src=images/alpha.png&f=png"> <img src="../phpThumb.php?src=images/alpha.png&f=ico"> <img src="../phpThumb.php?src=images/alpha.png&f=gif"> <img src="../phpThumb.php?src=images/alpha.png&f=jpeg">PNG alpha transparency test, using test image from the PNG transparency test page
(only works with PHP v4.3.2+, this server is running PHP v5.2.17 so it will work (correctly))



#11
<img src="../phpThumb.php?src=images/loco.jpg&w=200"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=usm|80|0.5|3">normal vs. unsharp masking at default settings
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)



#12
<img src="../phpThumb.php?src=images/loco.jpg&w=200"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=blur|1"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=blur|5">normal vs. blur at default (1) and heavy (5)
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)



#13
<img src="../phpThumb.php?src=images/loco.jpg&w=200"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=gblr"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=sblr">normal vs. gaussian blur vs. selective blur
(only works with PHP v5.0.0+, this server is running PHP v5.2.17 so it will work (correctly))
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)



#14
<img src="../phpThumb.php?src=images/pineapple.jpg&w=100&h=100&far=L&bg=0000FF&f=png&fltr[]=bord|1"> <img src="../phpThumb.php?src=images/loco.jpg&w=100&h=100&far=T&bg=FF0000&f=png&fltr[]=bord|1"> <img src="../phpThumb.php?src=images/pineapple.jpg&w=100&h=100&far=C&bg=0000FF&f=png&fltr[]=bord|1"> <img src="../phpThumb.php?src=images/loco.jpg&w=100&h=100&far=B&bg=FF0000&f=png&fltr[]=bord|1"> <img src="../phpThumb.php?src=images/pineapple.jpg&w=100&h=100&far=R&bg=0000FF&f=png&fltr[]=bord|1">Forced Aspect Ratio, colored background, PNG output
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#15
<img src="../phpThumb.php?src=images/pineapple.jpg&w=150&ar=L"> <img src="../phpThumb.php?src=images/loco.jpg&w=150&ar=L">auto-rotate counter-clockwise to landscape from portrait & lanscape
(only works with PHP v4.2.0+, this server is running PHP v5.2.17 so it will work)
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#16
<img src="../phpThumb.php?src=images/pineapple.jpg&hp=100&wl=200"> <img src="../phpThumb.php?src=images/loco.jpg&hp=100&wl=200">auto-selection of W and H based on source image orientation



#17
<img src="../phpThumb.php?src=images/monkey.jpg&w=150&h=150"> <img src="../phpThumb.php?src=images/monkey.jpg&w=150&h=150&ar=x">original image vs. auto-rotated based on EXIF data
(only works with PHP v4.2.0+, this server is running PHP v5.2.17 so it will work)
(only works when the EXIF extension is loaded, so on this server it will work)
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#18
<img src="../phpThumb.php?src=images/loco.jpg&w=200&ra=30&bg=0000FF"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&ra=30&f=png"> <img src="../phpThumb.php?src=images/alpha.png&ra=30&f=png"> <img src="../phpThumb.php?src=images/alpha.png&ra=30&f=gif">Rotated 30 (counter-clockwise), width=200px, blue background vs. transparent background vs. rotated image with pre-existing alpha
(only works with PHP v4.2.0+, this server is running PHP v5.2.17 so it will work)
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#19
<img src="../phpThumb.php?src=images/loco.jpg&w=200&h=300&far=1&bg=CCCCCC"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&h=300&iar=1">Normal resize behavior (left) vs. Forced non-proportional resize (right)
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#20
<img src="../phpThumb.php?src=images/loco.jpg&w=100&h=50&zc=1"> <img src="../phpThumb.php?src=images/loco.jpg&w=100&zc=1"> <img src="../phpThumb.php?src=images/loco.jpg&h=50&zc=1"> <img src="../phpThumb.php?src=images/pineapple.jpg&w=100&h=50&zc=1"> <img src="../phpThumb.php?src=images/pineapple.jpg&w=100&zc=1"> <img src="../phpThumb.php?src=images/pineapple.jpg&h=50&zc=1">Zoom-Crop



#21
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=crop|50"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=crop|0|0|0|0.25">crop filter



#22
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=bord|2|20|10|009900&f=png">2px border, curved border corners (20px horizontal radius, 10px vertical radius)
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#23
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=ric|50|20&f=png">curved border corners (20px vertical radius, 50px horizontal radius)
Note: PNG/ICO output is 32-bit with alpha transparency, subject to PNG transparency problem in Internet Explorer
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)
(only works with PHP v4.3.2+, this server is running PHP v5.2.17 so it will work (correctly))



#24
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=sat|75"> <img src="../phpThumb.php?src=images/loco.jpg&w=200"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=sat|-100">saturation -75% vs. normal vs. -100%
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)



#25
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=ds|75"> <img src="../phpThumb.php?src=images/loco.jpg&w=200"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=ds|-100">desaturated 75% vs. normal vs. -100%
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)



#26
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=clr|25|00FF00">colorized 25% to green (#00FF00)
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)



#27
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=gray"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=sep">grayscale vs. sepia
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)



#28
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=mask|images/mask06.png&f=png"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=mask|images/mask04.png&f=png"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=mask|images/mask05.png&f=jpeg&bg=9900CC&q=100">Assorted alpha masks (seen below) applied
Note: PNG/ICO output is 32-bit with alpha transparency, subject to PNG transparency problem in Internet Explorer
(only works with PHP v4.3.2+, this server is running PHP v5.2.17 so it will work (correctly))
JPEG/GIF output is flattened to "bg" background color
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)




#29
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=drop|5|10|000000|225&f=png"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=mask|images/mask06.png&fltr[]=drop|5|10|000000|225&f=png"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=drop|5|10|000000|225&fltr[]=elip&f=png"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=elip&fltr[]=drop|5|10|000000|225&f=png">Drop shadow. Note how the order in which filters are applied matters.
(only works with PHP v4.3.2+, this server is running PHP v5.2.17 so it will work (correctly))
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#30
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=elip&f=png"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=elip&f=jpeg&bg=00FFFF">Elipse
Note: PNG/ICO output is 32-bit with alpha transparency, subject to PNG transparency problem in Internet Explorer
(only works with PHP v4.3.2+, this server is running PHP v5.2.17 so it will work (correctly))
JPEG/GIF output is flattened to "bg" background color
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)



#31
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=flip|x"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=flip|y"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=flip|xy">flipped on X, Y and X+Y axes
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#32
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=bvl|10|FFFFFF|000000"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=bvl|10|000000|FFFFFF">10px bevel edge filter
(only works with PHP v4.3.2+, this server is running PHP v5.2.17 so it will work (correctly))
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#33
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=fram|3|2|CCCCCC|FFFFFF|000000"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=fram|3|2|CC9966|333333|CCCCCC">3+2px frame filter
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#34
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=neg">Negative filter (inverted color)
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#35
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=th|105"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=mask|images/mask04.png&fltr[]=th|105&f=png">Threshold filter; showing preserved alpha channel
(only works with PHP v4.3.2+, this server is running PHP v5.2.17 so it will work (correctly))
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#36
<img src="../phpThumb.php?src=images/pineapple.jpg&w=150"> <img src="../phpThumb.php?src=images/pineapple.jpg&w=150&fltr[]=rcd|16|1"> <img src="../phpThumb.php?src=images/pineapple.jpg&w=150&fltr[]=rcd|16|0"> <img src="../phpThumb.php?src=images/pineapple.jpg&w=150&fltr[]=gray&fltr[]=rcd|8|1">ReduceColorDepth filter; original vs. 16-color dither vs. 16-color nodither vs. 4-gray dither
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)



#37
<img src="../phpThumb.php?src=images/bunnies.jpg&w=200"> <img src="../phpThumb.php?src=images/bunnies.jpg&w=200&fltr[]=lvl">original vs. Levels filter (default settings)
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#38
<img src="../phpThumb.php?src=images/pineapple.jpg&w=200"> <img src="../phpThumb.php?src=images/pineapple.jpg&w=200&fltr[]=wb"> <img src="../phpThumb.php?src=images/pineapple.jpg&w=200&fltr[]=wb&fltr[]=lvl">original vs. White Balance vs. White Balance + Levels
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#39
<img src="../phpThumb.php?src=images/loco.jpg&w=300&fltr[]=hist|rgb"> <img src="../phpThumb.php?src=images/bunnies.jpg&w=200&fltr[]=hist|*">histograms of RGB vs. grayscale
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#40
<img src="../phpThumb.php?src=images/loco.jpg&w=300&fltr[]=edge">Edge Detect filter
(only works with PHP v5.0.0+ or ImageMagick, this server is running PHP v5.2.17 and "ImageMagick 6.7.6-8 2016-07-19 Q16" so it will work (correctly))
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)



#41
<img src="../phpThumb.php?src=images/loco.jpg&w=300&fltr[]=emb">Emboss filter
(only works with PHP v5.0.0+ or ImageMagick, this server is running PHP v5.2.17 and "ImageMagick 6.7.6-8 2016-07-19 Q16" so it will work (correctly))
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)



#42
<img src="../phpThumb.php?src=images/loco.jpg&w=300&fltr[]=mean">Mean Removal filter
(only works with PHP v5.0.0+, this server is running PHP v5.2.17 so it will work (correctly))
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)



#43
<img src="../phpThumb.php?src=images/loco.jpg&w=300&fltr[]=smth">Smooth filter
(only works with PHP v5.0.0+, this server is running PHP v5.2.17 so it will work (correctly))
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)



#44
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=gam|0.6"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=gam|1.6">Gamma corrected to 0.6 vs. 1.6
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#45
<img src="../phpThumb.php?src=images/loco.jpg&w=200"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=brit|50"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=brit|-50">Brightness filter (original vs. +50 vs. -50)
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)



#46
<img src="../phpThumb.php?src=images/loco.jpg&w=200"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=cont|50"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=cont|-50">Contrast filter (original vs. +50 vs. -50)
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)



#47
<img src="../phpThumb.php?src=images/pineapple.jpg&w=200&fltr[]=over|images/frame1.png|0"> <img src="../phpThumb.php?src=images/pineapple.jpg&w=200&fltr[]=over|images/frame2.png|1">Overlay vs. Underlay

Original over/under images:

(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#48
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=wmt|phpThumb|18|C|FF0000|loki.ttf|100|5|20&f=png"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=wmt|%26%239786%3B%26%239835%3B%26%230470%3B%26%231694%3B|40|L|FF0000|arial.ttf|100&f=png"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=wmt|copyright+2016|3|BR|00FFFF||50&f=png"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=wmt|copyright+2016%0AphpThumb()|3|L|00FFFF&f=png">Text overlay, TTF and built-in fonts, unicode characters (rawurlencoded HTMLentities), multiple lines, metacharacters (height, width)
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#49
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=wmt|thumbnail+=+^Xx^Y|3|BR|00FFFF||50&f=png"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=wmt|click%0Ahere%0A^FkkB|10|L|FF00FF|arial.ttf|100|0||333399|50|y&f=png"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=wmt|resized:+^Xx^Y+to+^xx^y|10|B|FFFFFF|arial.ttf|100|0||000000|100|x&f=png">metacharacters (height, width), background color, background extend
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#50
<img src="../phpThumb.php?new=FF0000&w=100&h=50&fltr[]=bvl|10&fltr[]=wmt|hello|14|C|00FFFF|arial.ttf&f=png"> <img src="../phpThumb.phpnew=FF0000|25&w=150&h=50&fltr[]=bvl|10&fltr[]=wmt|25%+opaque|14|C|0066FF|arial.ttf&f=png">Image created with "new", red background, bevel, TTF text
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)



#51
<img src="../phpThumb.php?src=images/winnt.bmp&w=200">BMP source, width=200px



#52
<img src="../phpThumb.php?src=images/1024-none.tiff"> <img src="../phpThumb.php?src=images/1024-none.tiff&w=200&aoe=1">TIFF source, width=200px
(requires ImageMagick, this server is running "ImageMagick 6.7.6-8 2016-07-19 Q16" so it will work)



#53
<img src="../phpThumb.php?src=images/computer.wmf&w=200">WMF source, width=200px
(requires ImageMagick, this server is running "ImageMagick 6.7.6-8 2016-07-19 Q16" so it will work)



#pathinfo
<img src="../phpThumb.php/fltr[]=sep;200x200;images/pineapple.jpg"> <img src="../phpThumb.php/f=png;fltr[]=wmt|hello;fltr[]=flip|y;fltr[]=wmt|hello;200x100;new=FF00FF"> PATH_INFO example




Illustration of potential difference between GD1.x and GD2.x
In most cases the thumbnails produced by phpThumb() on GD v1.x are perfectly acceptable, but in some cases it may look ugly. Diagonal lines and reducing a very large source image increase chance for bad results (the house/sky picture has both problems). Here are three static examples:
GD v2.0.15 kayak.jpg generated with phpThumb() on GD v2.0.15 bottle.jpg generated with phpThumb() on GD v2.0.15 sky.jpg generated with phpThumb() on GD v2.0.15
GD v1.6.2 kayak.jpg generated with phpThumb() on GD v1.6.2 bottle.jpg generated with phpThumb() on GD v1.6.2 sky.jpg generated with phpThumb() on GD v1.6.2



Demo of phpThumb.demo.showpic.php

Small picture (400x300), window opened at wrong size (640x480):


Big picture (2272x1704), window opened at wrong size (640x480):



The source images, without manipulation: