티스토리 뷰
* 예시중 X|Y|A 이런식은 fltr[]=X|Y|A 로 filter로 파라미터 해줌.
예시 :
예 : http://~~~./phpThumb.php?src=up_file/h.jpg&q=100&w=200&h=200&fltr[]=wmi|wm/wm.png|BL&sia=aaaa&f=gif&bg=000000
src= 만들 이미지 (h.jpg)
q= 품질(0~100)
w= 넓이
h= 높이 ->내생각 : 같은 비율로 큰 쪽을 기준으로 줄어드는듯.. 그러니 한쪽만 해주는것이 좋겠다.
fltr[]=wmi|wm/wm.png|BL 워터마크 씌울 파일 => BL 은 bottom + left , * 는 모든 곳에 찍는다 정가운데 C 하나만 한다.
fltr[]= stc|FFFFFF|5|10 : transparency
fltr[]=usm|80|0.5|3 : unsharp
fltr[]=blur|5 : blur
fltr[]=sblr : gaussian blur
fltr[]=bord|1 : border (bord|1|0|0|FE5207 : 보더|굵기|상|하둥글이|색)
fltr[]=mask|images/mask05.png : mask
fltr[]=wmt|phpThumb|18|C|FF0000|loki.ttf|100|5|20 : 문자쓰기
-> 예제 : <img src="http://matda.co.kr/class/thumb/phpThumb.php?src=wm/blank.png&q=100&w=500&h=70&fltr[]=wmt|안 녕|18|C|000000|hline.ttf|80|0|0&iar=1&sia=<?=urlencode('안녕')?>" />
* fltr[]=wmt|안 녕|18|C|000000|hline.ttf|80|0|0 : fltr[]=wmt|쓸문자|폰트크기|위치|색깔|폰트종류|opacity|모름ㅋ|로테이트
* + : 띄워쓰기(그냥 스페이바해도됨)
* %0A : 줄바꿈
-> 폰트는 리눅스의경우 /etc/share/korea/TrueType/안에것 fonts/안에 복사에 놓음
-> 익스에서만 폰트가 제대로 안나올 경우 urlencode('안녕') 해볼것.
->필터 2개 줄때 : fltr[]=wmi|wm/wm.png|BL&fltr[]=blur|5 ........
ar=l : (auto rotate) L 또는 l -> 넓은쪽(landscape), P 또는 p -> 좁은쪽기준(potrait), x -> EXIF 기준으로 자동 rotate 시킴
ra=30 : (ratio aspect?) 30도 로테이트 시킴
iar=1 : 가로 세로 비율 상관없이 억지로 늘리거나 줄임
zc=1 : zoom-crop (가운데를 기점으로 설정된 넓이 높이 만큼 잘라내는 듯)
aoe=1 : 작은거 늘려서 출력(AllowOutputEnlargement enabled)
w=250&sx=60&sy=5&sw=100&sh=100 : 원본 250px 넓이의 이미지를 x축 60, y축5px 부터 100X100px로 잘라내라
far=T : (Fource Aspect Ratio) Top 기준으로 강제 비율로 줄임(맞춤) (C-Cent,T-Top,B-Bottom,L-Left,R-Right)
crop|0|0|0|0.25 : crop filter (zc=1 과의 차이를 모르겠네..;;)
bord|2|20|10|009900 : 라운딩 보더 (2px border | 가로둥근 정도 | 세로둥근정도 | 모름;;)
ric|50|20 : 이미지를 둥글게 잘라내어 썸네일 (가로 둥금, 세로 둥금)
sat|-100 : 흑백 (0~-100%)
sia= 다운로드 받을 파일명
f= 생성 포맷(gif, jpg, png, ico)
bg= 백그라운드 (000000)
hash=Math.random(), hash=rand()
-> 캐시(cache)에 남아 이전 사진을 계속 보여줄때 이렇게 처리했음. phpthumb은 허용된 parameter만 받아들이기에 hash로 이용함 ㅡㅡㅋ (handler.js)
wmi|images/watermark.png|75x50|80|75|75|45 -> 이런옵션도 있음 (wmi|워터마크|x,y좌표|opacity|scale_x|scale_y|rotation)
글쓰기
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=wmt|phpThumb|18|C|FF0000|loki.ttf|100|5|20&f=png" alt="">
<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" alt="">
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=wmt|copyright+2009|3|BR|00FF00||50&f=png" alt="">
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=wmt|copyright+2009%0AphpThumb()|3|L|00FFFF&f=png" alt="">
결과물 :
aaaa 라는 파일명으로 다운
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" alt="">phpThumb version
#1
![]() |
<img src="../phpThumb.php?src=images/disk.jpg&w=200" alt="">width=200px
#2
![]() |
<img src="../phpThumb.php?src=images/disk.jpg&w=200&q=10&sia=custom-filename" alt="">width=200px, JPEGquality=10%, SaveImageAs=custom-filename
#3
![]() |
<img src="../phpThumb.php?src=images/watermark.png&w=400&aoe=1&bg=ffffff" alt="">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" alt="">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" alt="">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" alt="">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" alt="">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/disk.jpg&w=200&fltr[]=wmi|images/watermark.png|75x50|80|75|75|45" alt="">width=200px, watermark (absolute position (75x50), rotation (45), scaling (75x75)))
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)
#9
![]() ![]() ![]() |
<img src="../phpThumb.php?src=images/watermark.png&bg=00FFFF&f=png" alt="">source image (GIF) transpancy with transparent output (PNG, GIF) vs. specified background color (JPEG)
<img src="../phpThumb.php?src=images/watermark.png&bg=00FFFF&f=gif" alt="">
<img src="../phpThumb.php?src=images/watermark.png&bg=00FFFF&f=jpeg" alt="">
#10
![]() ![]() ![]() ![]() ![]() ![]() |
<img src="../phpThumb.php?src=images/animaple.gif" alt="">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).
<img src="../phpThumb.php?src=images/animaple.gif&w=25&f=gif" alt="">
<img src="../phpThumb.php?src=images/animaple.gif&w=25&f=png" alt="">
<img src="../phpThumb.php?src=images/animaple.gif&w=25&f=ico" alt="">
<img src="../phpThumb.php?src=images/animaple.gif&w=25&f=bmp" alt="">
<img src="../phpThumb.php?src=images/animaple.gif&w=25&f=jpeg" alt="">
(requires ImageMagick, this server is running "6.2.8 04/17/08 Q16" so it will work)
#11
![]() ![]() ![]() |
<img src="../phpThumb.php?src=images/animaple.gif" alt="">Specifying still-image source frame in multi-frame source images
<img src="../phpThumb.php?src=images/animaple.gif&sfn=0&f=png" alt="">
<img src="../phpThumb.php?src=images/animaple.gif&sfn=2&f=png" alt="">
(requires ImageMagick, this server is running "6.2.8 04/17/08 Q16" so it will work)
#12
![]() ![]() ![]() ![]() |
<img src="../phpThumb.php?src=images/alpha.png&f=png" alt="">PNG alpha transparency test, using test image from the PNG transparency test page
<img src="../phpThumb.php?src=images/alpha.png&f=ico" alt="">
<img src="../phpThumb.php?src=images/alpha.png&f=gif" alt="">
<img src="../phpThumb.php?src=images/alpha.png&f=jpeg" alt="">
(only works with PHP v4.3.2+, this server is running PHP v5.2.8 so it will work (correctly))
#13
![]() |
<img src="../phpThumb.php?src=images/disk.jpg&w=200&fltr[]=stc|FFFFFF|5|10&f=png" alt="">Create transparency from source image color
(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/loco.jpg&w=200" alt="">normal vs. unsharp masking at default settings
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=usm|80|0.5|3" alt="">
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)
#15
![]() ![]() ![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=200" alt="">normal vs. blur at default (1) and heavy (5)
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=blur|1" alt="">
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=blur|5" alt="">
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)
#16
![]() ![]() ![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=200" alt="">normal vs. gaussian blur vs. selective blur
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=gblr" alt="">
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=sblr" alt="">
(only works with PHP v5.0.0+, this server is running PHP v5.2.8 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)
#17
![]() ![]() ![]() ![]() ![]() |
<img src="../phpThumb.php?src=images/pineapple.jpg&w=100&h=100&far=L&bg=0000FF&f=png&fltr[]=bord|1" alt="">Forced Aspect Ratio, colored background, PNG output
<img src="../phpThumb.php?src=images/loco.jpg&w=100&h=100&far=T&bg=FF0000&f=png&fltr[]=bord|1" alt="">
<img src="../phpThumb.php?src=images/pineapple.jpg&w=100&h=100&far=C&bg=0000FF&f=png&fltr[]=bord|1" alt="">
<img src="../phpThumb.php?src=images/loco.jpg&w=100&h=100&far=B&bg=FF0000&f=png&fltr[]=bord|1" alt="">
<img src="../phpThumb.php?src=images/pineapple.jpg&w=100&h=100&far=R&bg=0000FF&f=png&fltr[]=bord|1" alt="">
(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/pineapple.jpg&w=150&ar=L" alt="">auto-rotate counter-clockwise to landscape from portrait & lanscape
<img src="../phpThumb.php?src=images/loco.jpg&w=150&ar=L" alt="">
(only works with PHP v4.2.0+, this server is running PHP v5.2.8 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/pineapple.jpg&hp=100&wl=200" alt="">auto-selection of W and H based on source image orientation
<img src="../phpThumb.php?src=images/loco.jpg&hp=100&wl=200" alt="">
#20
![]() ![]() |
<img src="../phpThumb.php?src=images/monkey.jpg&w=150&h=150" alt="">original image vs. auto-rotated based on EXIF data
<img src="../phpThumb.php?src=images/monkey.jpg&w=150&h=150&ar=x" alt="">
(only works with PHP v4.2.0+, this server is running PHP v5.2.8 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)
#21
![]() ![]() ![]() ![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=200&ra=30&bg=0000FF" alt="">Rotated 30� (counter-clockwise), width=200px, blue background vs. transparent background vs. rotated image with pre-existing alpha
<img src="../phpThumb.php?src=images/loco.jpg&w=200&ra=30&f=png" alt="">
<img src="../phpThumb.php?src=images/alpha.png&ra=30&f=png" alt="">
<img src="../phpThumb.php?src=images/alpha.png&ra=30&f=gif" alt="">
(only works with PHP v4.2.0+, this server is running PHP v5.2.8 so it will work)
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)
#22
![]() ![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=200&h=300&far=1&bg=CCCCCC" alt="">Normal resize behavior (left) vs. Forced non-proportional resize (right)
<img src="../phpThumb.php?src=images/loco.jpg&w=200&h=300&iar=1" alt="">
(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=100&h=50&zc=1" alt="">Zoom-Crop
<img src="../phpThumb.php?src=images/loco.jpg&w=100&zc=1" alt="">
<img src="../phpThumb.php?src=images/loco.jpg&h=50&zc=1" alt="">
<img src="../phpThumb.php?src=images/pineapple.jpg&w=100&h=50&zc=1" alt="">
<img src="../phpThumb.php?src=images/pineapple.jpg&w=100&zc=1" alt="">
<img src="../phpThumb.php?src=images/pineapple.jpg&h=50&zc=1" alt="">
#24
![]() ![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=crop|50" alt="">crop filter
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=crop|0|0|0|0.25" alt="">
#25
![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=bord|2|20|10|009900&f=png" alt="">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)
#26
![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=ric|50|20&f=png" alt="">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.8 so it will work (correctly))
#27
![]() ![]() ![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=sat|75" alt="">saturation -75% vs. normal vs. -100%
<img src="../phpThumb.php?src=images/loco.jpg&w=200" alt="">
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=sat|-100" alt="">
(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[]=ds|75" alt="">desaturated 75% vs. normal vs. -100%
<img src="../phpThumb.php?src=images/loco.jpg&w=200" alt="">
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=ds|-100" alt="">
(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[]=clr|25|00FF00" alt="">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)
#30
![]() ![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=gray" alt="">grayscale vs. sepia
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=sep" alt="">
(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[]=mask|images/mask06.png&f=png" alt="">Assorted alpha masks (seen below) applied
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=mask|images/mask04.png&f=png" alt="">
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=mask|images/mask05.png&f=jpeg&bg=9900CC&q=100" alt="">
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.8 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)



#32
![]() ![]() ![]() ![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=drop|5|10|000000|225&f=png" alt="">Drop shadow. Note how the order in which filters are applied matters.
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=mask|images/mask06.png&fltr[]=drop|5|10|000000|225&f=png" alt="">
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=drop|5|10|000000|225&fltr[]=elip&f=png" alt="">
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=elip&fltr[]=drop|5|10|000000|225&f=png" alt="">
(only works with PHP v4.3.2+, this server is running PHP v5.2.8 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[]=elip&f=png" alt="">Elipse
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=elip&f=jpeg&bg=00FFFF" alt="">
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.8 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)
#34
![]() ![]() ![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=flip|x" alt="">flipped on X, Y and X+Y axes
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=flip|y" alt="">
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=flip|xy" alt="">
(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[]=bvl|10|FFFFFF|000000" alt="">10px bevel edge filter
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=bvl|10|000000|FFFFFF" alt="">
(only works with PHP v4.3.2+, this server is running PHP v5.2.8 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/loco.jpg&w=200&fltr[]=fram|3|2|CCCCCC|FFFFFF|000000" alt="">3+2px frame filter
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=fram|3|2|CC9966|333333|CCCCCC" alt="">
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)
#37
![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=neg" alt="">Negative filter (inverted color)
(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/loco.jpg&w=200&fltr[]=th|105" alt="">Threshold filter; showing preserved alpha channel
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=mask|images/mask04.png&fltr[]=th|105&f=png" alt="">
(only works with PHP v4.3.2+, this server is running PHP v5.2.8 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)
#39
![]() ![]() ![]() ![]() |
<img src="../phpThumb.php?src=images/pineapple.jpg&w=150" alt="">ReduceColorDepth filter; original vs. 16-color dither vs. 16-color nodither vs. 4-gray dither
<img src="../phpThumb.php?src=images/pineapple.jpg&w=150&fltr[]=rcd|16|1" alt="">
<img src="../phpThumb.php?src=images/pineapple.jpg&w=150&fltr[]=rcd|16|0" alt="">
<img src="../phpThumb.php?src=images/pineapple.jpg&w=150&fltr[]=gray&fltr[]=rcd|8|1" alt="">
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)
#40
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
<img src="../phpThumb.php?src=images/bunnies.jpg&w=150&fltr[]=hist|rgb||||BR|100&fltr[]=hist|*||||BL|100" alt="">original vs. Levels filter methods (0=Internal RGB; 1=Internal Grayscale; 2=ImageMagick Contrast-Stretch; 3=ImageMagick Normalize)
<img src="../phpThumb.php?src=images/bunnies.jpg&w=150&fltr[]=lvl|*|0&fltr[]=hist|rgb||||BR|100&fltr[]=hist|*||||BL|100" alt="">
<img src="../phpThumb.php?src=images/bunnies.jpg&w=150&fltr[]=lvl|*|1&fltr[]=hist|rgb||||BR|100&fltr[]=hist|*||||BL|100" alt="">
<img src="../phpThumb.php?src=images/bunnies.jpg&w=150&fltr[]=lvl|*|2&fltr[]=hist|rgb||||BR|100&fltr[]=hist|*||||BL|100" alt="">
<img src="../phpThumb.php?src=images/bunnies.jpg&w=150&fltr[]=lvl|*|3&fltr[]=hist|rgb||||BR|100&fltr[]=hist|*||||BL|100" alt="">
<img src="../phpThumb.php?src=images/lilies.jpg&w=150&fltr[]=hist|rgb||||BR|100&fltr[]=hist|*||||BL|100" alt="">
<img src="../phpThumb.php?src=images/lilies.jpg&w=150&fltr[]=lvl|*|0&fltr[]=hist|rgb||||BR|100&fltr[]=hist|*||||BL|100" alt="">
<img src="../phpThumb.php?src=images/lilies.jpg&w=150&fltr[]=lvl|*|1&fltr[]=hist|rgb||||BR|100&fltr[]=hist|*||||BL|100" alt="">
<img src="../phpThumb.php?src=images/lilies.jpg&w=150&fltr[]=lvl|*|2&fltr[]=hist|rgb||||BR|100&fltr[]=hist|*||||BL|100" alt="">
<img src="../phpThumb.php?src=images/lilies.jpg&w=150&fltr[]=lvl|*|3&fltr[]=hist|rgb||||BR|100&fltr[]=hist|*||||BL|100" alt="">
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)
#41
![]() ![]() ![]() |
<img src="../phpThumb.php?src=images/pineapple.jpg&w=200" alt="">original vs. Levels vs. White Balance
<img src="../phpThumb.php?src=images/pineapple.jpg&w=200&fltr[]=lvl" alt="">
<img src="../phpThumb.php?src=images/pineapple.jpg&w=200&fltr[]=wb" alt="">
(only works with GD (any version), 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[]=hist|rgb" alt="">histograms of RGB vs. grayscale
<img src="../phpThumb.php?src=images/bunnies.jpg&w=200&fltr[]=hist|*" alt="">
(only works with GD (any version), 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[]=edge" alt="">Edge Detect filter
(only works with PHP v5.0.0+ or ImageMagick, this server is running PHP v5.2.8 and "6.2.8 04/17/08 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)
#44
![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=300&fltr[]=emb" alt="">Emboss filter
(only works with PHP v5.0.0+ or ImageMagick, this server is running PHP v5.2.8 and "6.2.8 04/17/08 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)
#45
![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=300&fltr[]=mean" alt="">Mean Removal filter
(only works with PHP v5.0.0+, this server is running PHP v5.2.8 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)
#46
![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=300&fltr[]=smth" alt="">Smooth filter
(only works with PHP v5.0.0+, this server is running PHP v5.2.8 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)
#47
![]() ![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=gam|0.6" alt="">Gamma corrected to 0.6 vs. 1.6
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=gam|1.6" alt="">
(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" alt="">Brightness filter (original vs. +50 vs. -50)
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=brit|50" alt="">
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=brit|-50" alt="">
(only works with GD v2.0+, 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" alt="">Contrast filter (original vs. +50 vs. -50)
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=cont|50" alt="">
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=cont|-50" alt="">
(only works with GD v2.0+, this server is running GD "bundled (2.0.34 compatible)" so it will work)
#50
![]() ![]() |
<img src="../phpThumb.php?src=images/pineapple.jpg&w=200&fltr[]=over|images/frame1.png|0" alt="">Overlay vs. Underlay
<img src="../phpThumb.php?src=images/pineapple.jpg&w=200&fltr[]=over|images/frame2.png|1" alt="">
Original over/under images:
![]() ![]() |
(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/loco.jpg&w=200&fltr[]=wmt|phpThumb|18|C|FF0000|loki.ttf|100|5|20&f=png" alt="">Text overlay, TTF and built-in fonts, unicode characters (rawurlencoded HTMLentities), multiple lines, metacharacters (height, width)
<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" alt="">
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=wmt|copyright+2009|3|BR|00FF00||50&f=png" alt="">
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=wmt|copyright+2009%0AphpThumb()|3|L|00FFFF&f=png" alt="">
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)
#52
![]() ![]() ![]() |
<img src="../phpThumb.php?src=images/loco.jpg&w=200&fltr[]=wmt|thumbnail+=+^Xx^Y|3|BR|00FFFF||50&f=png" alt="">metacharacters (height, width), background color, background extend
<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" alt="">
<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" alt="">
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)
#53
<img src="../phpThumb.php?new=FF0000&w=100&h=50&fltr[]=bvl|10&fltr[]=wmt|hello|14|C|00FFFF|arial.ttf&f=png" alt="">Image created with "new", red background, bevel, TTF text
<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" alt="">
(only works with GD (any version), this server is running GD "bundled (2.0.34 compatible)" so it will work)
#54
![]() |
<img src="../phpThumb.php?src=images/winnt.bmp&w=200" alt="">BMP source, width=200px
#55
<img src="../phpThumb.php?src=images/1024-none.tiff" alt="">TIFF source, width=200px
<img src="../phpThumb.php?src=images/1024-none.tiff&w=200&aoe=1" alt="">
(requires ImageMagick, this server is running "6.2.8 04/17/08 Q16" so it will work)
#56
<img src="../phpThumb.php?src=images/computer.wmf&w=200" alt="">WMF source, width=200px
(requires ImageMagick, this server is running "6.2.8 04/17/08 Q16" so it will work)
#pathinfo
![]() |
<img src="../phpThumb.php/fltr[]=sep;200x200;images/pineapple.jpg" alt="">PATH_INFO example
<img src="../phpThumb.php/f=png;fltr[]=wmt|hello;fltr[]=flip|y;fltr[]=wmt|hello;200x100;new=FF00FF" alt="">
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 | ![]() |
![]() |
![]() |
GD v1.6.2 | ![]() |
![]() |
![]() |
Demo of phpThumb.demo.showpic.php
Small picture (400x300), window opened at wrong size (640x480):
(mouse-over to see calling parameters)

unmodified text watermark
Big picture (2272x1704), window opened at wrong size (640x480):
(mouse-over to see calling parameters)

unmodified width=800 width=200, grayscale
The source images, without manipulation:
- lrock011.jpg
- disk.jpg
- loco.jpg
- pineapple.jpg
- monkey.jpg
- watermark.png
- bunnies.jpg
- lilies.jpg
- animaple.gif
- alpha.png
- mask04.png
- mask05.png
- mask06.png
- frame1.png
- frame2.png
- winnt.bmp
- 1024-none.tiff
- computer.wmf
- small.jpg
- big.jpg
'컴터 > php' 카테고리의 다른 글
텍스트로 다운받은 파일을 메모장으로 열때 줄바꿈 대신 이상한 문자가 찍힐때 (2) | 2009.04.08 |
---|---|
www가 붙은 도메인과 안붙은 같은 도메인, 로그인 세션 유지 (0) | 2009.03.22 |
디렉토리 읽기 재귀함수 (0) | 2008.08.29 |
[펌] PHP 코드를 최적화하는 40가지 팁 (0) | 2008.08.21 |
- Total
- 1,769,490
- Today
- 7
- Yesterday
- 15
- Adobe AIR / www.AS3.kr / Actio…
- Adobe AIR Devpia.
- Beyond Tomorrow
- Blog of Shigeru Nakagaki. Let\…
- CSS3 . Info
- Code Weblog
- CodeIgniter 한국사용자포럼 BETA
- ECONOBLOG
- FlexComponent-플렉스 네이버 카페
- Guru's Blog
- Hooney.net - CSS Reference Sit…
- Korean Healthlog
- Raymond.CC Blog
- [Air]AIR_IN_ACTION
- [CSS]후니넷
- [Flex] css 스킨
- [JavaFx] 한글화
- [basic4ppc]괜찮은 사이트
- [flex2책저자]with okgosu (-..-)a
- [flex] stylesheet
- [flex] 예제 많은곳-EBook관련
- [flex]ungsung' study
- [html5-canvas]『 zeroone 』blog
- [html5-iphone]xguru.net
- [html5]korea html5 group
- [html5]sencha touch demos - fr…
- [iPhone]아이군의 블로그
- [iphone] 토리의 놀이터
- [iphone]LambertPark
- [iphone]safari 레퍼런스
- [iphone]피의복수
- [jQuery Plugin] 포토갤러리
- [jQuery] -- jQuery
- [jQuery] 1.1.2 API Browser
- [jQuery] IBM 사이트 설명
- [jQuery] 예제 많음
- [javascript]JKwang's Programs
- [red5]
- [그래픽js] 끝내줌.ㅋ
- [김프]무료 이미지 관리툴 -비교대상 포토샵
- [무료캡쳐프로그램] jing Project - swf …
- [무료호스팅]1.5Gb 줌
- [서프라이즈] - 대문
- [실버라이트] msdn
- [실버라이트]ONESTONE
- [실버라이트]ZZANGMYON BLOG♡
- [실버라이트]사진속에 혼을 담는 개발자
- [실버라이트]유령회사 공도소프트
- [실버라이트]이과장의 프로그래밍이야기
- [오픈소스검색엔진]루씬 한글분석기 오픈소스 프로젝트
- [해킨토시]x86osx.com
- adobe 예제 사이트
- d-|-b First Of May
- lovesera.com: ART of VIRTUE
- rollin96님의 노트-air/flex Tip
- w3school.com
- 굿네이버스
- 꿀뷰, 바닥, 술집의 개발자
- 나물이네-자취생들의 먹거리 해결..ㅋ
- 낙장불입 인생막장
- 내 눈으로 본 한국, 한국인....
- 딴동네-Air/Flex 영상 강좌
- 레인 에디터
- 류종택의 프로그래밍 강의실
- 리아 코리아
- 무료 호스팅 해줌 - 디지문
- 버터백통의 Action Script 레시피
- 살아 숨 쉬는 웹 - 블루비
- 색깔있는 진보 칼라TV
- 시작하세요! iphone3
- 아이디어 상품
- 아폴로케이션[Adobe AIR]
- 엑셀 도움말
- 영원의 헤아림-검쉰-Flex
- 오픈소스 FLV 플레이어
- 울나라 Ajax Library
- 웹사이트 방문자 통계
- 웹카페-css 잘나왔뜸
- 웹캠으로하는 멋진 게임
- 웹프로그래머의 홈페이지 정보 블로그
- 윤훈남의 액션스크립트3.0
- 조인시 위키
- 체리필터의 인생이야기
- 충청투데이 알짜 뉴스
- 칸과칸사이
- 태우\'s log - web 2.0 and beyond
- 파비콘 제네레이터
- 파인애플 밴드
- 팬소년이야기
- 한국의 대표 진보언론 민중의소리 - 전체 기사
- 훈스닷컴
- Feeding.kr의 일용할양식
- [javascript]기억하고 싶은 것들
- XML-RPC-metaWeblog 설명
- [IT웹툰]미닉스의 작은 이야기들
- outsider 개발자
- 애매한 발음 알아볼때
- [android]Photographer. Android…
- [android]mSurf Lab 안드로이드 개발 정보…
- [android]안드로이드 개발 정보
- [android]안드로이드 개발하는놈
- [android]안드로이드 프로그래밍 정복
- [android]참 쉽습니까?
- [android]커니의 안드로이드 이야기 - Andro…
- [android]회색의 구글 안드로이드 개발
- 장군블로그 [진심을 담는 마크업. 웹 표준. 웹 접근성…
- 백남중
- NARADESIGN:BLOG
- [php.js] php함수 js로 옮겨놓은 곳
- javascript 이론적으로 설명잘해놓은곳
- JavaScript Garden
- Angularjs 등 javascript 설명
- node.js
- 유용한 코드 많은 곳...코드쪼가리?
- HTML5 Demos- 최고!!!
- Firejune - The Web is still ch…
- 글읽어주는 사이트
- [publisher] Clearboth
- [nodejs]Hello World!!
- angularjs2 - 강추
- 모든 브라우저에서 동작하는 canvas
- Beautiful Jquery Plugin MopTip…
- 김진형교수의 SW정책 단상
- Comments for 미스타표, 즐기며 배우며.
- [외국개발자]곰같은블로그
- [opencv]다크 프로그래머
- [YouTube]日本人の知らない日本語
- 영어학습 자료실 EnglishCube - 추천사이트, …
- がんばれ! 日本語
- [youtube]serina hwang
- 하라마~~~
- O HOUSE : 라이프 매거진
- 아름다운 하우스 : 네이버 블로그
- [인테리어]김반장의 이중생활
- [리모델링]Pastel design & Archi te…
- [리모델링]대전 아파트 인테리어 전문 업체! 엘림하우스
- [리모델링]가람홈스토리
- :: Back to the Mac
- Swift 언어 개발문서
- [swift]Seorenn SIGSEGV
- Swift Lab를 위한 댓글
- 콩닥맘의 차니스토리 : 네이버 블로그
- 헬렌의 테이스팅 메뉴 The Tasting Menu
- lovesera: ART of VIRTUE-정진호
- [ionic] saltfactory's blog
- PhoneGap API Documentation
- 김변의 법인등기 : 네이버 블로그
- 면어의 얼렁뚱땅 캘리그라피
- 푸른지성과 카즈미, 그리고 코타의 행복한 세상!
- AnimationKING
- AnimationKING : 네이버 블로그
- POND X P.B.Y
- 도쿄 동경 베쯔니 블로그
- whatdo.net-티티호스팅
- 재개발
- 충청투데이
- Alert.show
- 아이폰
- 봄
- 쌍둥이빌딩
- html5
- 맥북에어 13
- 안드로이드
- AIR
- 공개
- 자양동
- Ajax
- 골목
- 겨울준비
- 대전역
- localstorage
- 가오지구
- 해킨토시
- 티눈
- jQuery
- ogv
- exif 정보
- 사마귀
- html5예제
- 넥서스원
- 고려극장
- flex
- 자전거
- php