This is a demo of phpThumb() (current version: v1.6.3-200511261736)

Note: this server is working on GD "bundled (2.1.0 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?src=images/disk.jpg&w=200">width=200px



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



#2
<img src="../phpThumb.php?src=images/disk.jpg&w=200&f=png">width=200px, format=PNG



#3
<img src="../phpThumb.php?src=images/disk.jpg&w=700&aoe=1">width=700px, AllowOutputEnlargement enabled



#4
<img src="../phpThumb.php?src=images/disk.jpg&w=250&sx=25&sy=40&sw=130&sh=65&aoe=1">section from (125x140 - 255x190) cropped and enlarged by 200%, AllowOutputEnlargement enabled



#5
<img src="../phpThumb.php?src=images/disk.jpg&w=200&fltr[]=wmi|images/watermark.png|BL">width=200px, watermark (bottom-left, 75% opacity)



#6
<img src="../phpThumb.php?src=images/disk.jpg&w=200&fltr[]=wmi|images/watermark.png|*|25">width=200px, watermark (tiled, 25% opacity)



#7
<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)



#8
<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=jpeg">resize animated GIF. Notice how output format affects the result: GIF is animated and transparent; PNG is tranparent but not animated (first frame is rendered as a still image); JPEG is neither transparent nor animated. Any filters will disable animated resizing (may be fixed in a future version).

(requires ImageMagick, this server is running "" so it will not work)



#9
<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.1.0 compatible)" so it will work)



#10
<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.1.0 compatible)" so it will work)



#11
<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.6.40 so it will work (correctly))
(only works with GD v2.0+, this server is running GD "bundled (2.1.0 compatible)" so it will work)



#12
<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



#13
<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.6.40 so it will work)



#14
<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



#15
<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.6.40 so it will work)
(only works when the EXIF extension is loaded, so on this server it will work)



#16
<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">Rotated 30 (counter-clockwise), width=200px, blue background vs. transparent background
(only works with PHP v4.2.0+, this server is running PHP v5.6.40 so it will work)



#17
<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)



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



#19
<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)



#20
<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 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.1.0 compatible)" so it will work)
(only works with PHP v4.3.2+, this server is running PHP v5.6.40 so it will work (correctly))



#21
<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.1.0 compatible)" so it will work)



#22
<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.1.0 compatible)" so it will work)



#23
<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.1.0 compatible)" so it will work)



#24
<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.1.0 compatible)" so it will work)



#25
<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 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.6.40 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.1.0 compatible)" so it will work)




#26
<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.6.40 so it will work (correctly))



#27
<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 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.6.40 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.1.0 compatible)" so it will work)



#28
<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



#29
<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.6.40 so it will work (correctly))



#30
<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



#31
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=neg">Negative filter (inverted color)



#32
<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.6.40 so it will work (correctly))



#33
<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|4|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.1.0 compatible)" so it will work)



#34
<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)



#35
<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



#36
<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



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



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



#39
<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.6.40 so it will work (correctly))
(only works with GD v2.0+, this server is running GD "bundled (2.1.0 compatible)" so it will work)



#40
<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.6.40 so it will work (correctly))
(only works with GD v2.0+, this server is running GD "bundled (2.1.0 compatible)" so it will work)



#41
<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



#42
<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.1.0 compatible)" so it will work)



#43
<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.1.0 compatible)" so it will work)



#44
<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:




#45
<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|copyright+2004|3|BR|00FFFF||50&f=png"> <img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=wmt|copyright+2004%0AphpThumb()|3|L|00FFFF&f=png">Text overlay, TTF and built-in fonts, multiple lines



#46
<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.php?new=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



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



#48
<img src="../phpThumb.php?src=images/1024-none.tiff&w=200">TIFF source, width=200px



#49
<img src="../phpThumb.php?src=images/globe.wmf&w=200">WMF source, width=200px



#pathinfo
<img src="../phpThumb.php/fltr[]=sep;200x200;images/pineapple.jpg">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 (500x333), window opened at wrong size (640x480):


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



The source images, without manipulation: