If case you haven’t noticed – YUI Charts hit the streets. As with everything new, it’s best shown and understood by example. So here’s the simplest example of using a pie chart. Basically I took the example from the YUI page, changed all the paths to point to yahooapis.com (where YUI is hosted for free) […]
Archive for the 'images' Category
Image fun with PHP – part 2
Nov 13th, 2007This post is a demo of what the imagefilter() PHP function can do for you. The Original imagefilter() called with different filter constants Filter: IMG_FILTER_BRIGHTNESSCode to reproduce: <?php $image = imagecreatefrompng(‘nathalie.png’); imagefilter($image, IMG_FILTER_BRIGHTNESS, 5); imagepng($image, ‘img_filter_brightness_5.png’); imagedestroy($image); ?> Filter: IMG_FILTER_BRIGHTNESSCode to reproduce: <?php $image = imagecreatefrompng(‘nathalie.png’); imagefilter($image, IMG_FILTER_BRIGHTNESS, 50); imagepng($image, ‘img_filter_brightness_50.png’); imagedestroy($image); ?> Filter: IMG_FILTER_BRIGHTNESSCode to reproduce: <?php $image = imagecreatefrompng(‘nathalie.png’); imagefilter($image, IMG_FILTER_BRIGHTNESS, 100); imagepng($image, ‘img_filter_brightness_100.png’); imagedestroy($image); […]
Image_Text 0.6 beta is out
Apr 19th, 2007» Download here This is my first PEAR release and I was actually surprised how easy it is to package and roll out a release. So you have your local copy of the CVS repository that contains the scripts you want to release as part of the package. In order to release, you need package.xml, […]
Laziest image resize in PHP
Dec 13th, 2006Today I saw a post at digg.com on image resizing with PHP and there was quite a discussion. Let me share the laziest way (that I know of) how to do it – PEAR::Image_Transform is all it takes. Here goes: <?php require_once ‘Image/Transform.php’; $i =& Image_Transform::factory(”); $i->load(‘test.jpg’); $i->fit(100,100); $i->save(‘resized.png’, ‘png’); ?> In addition, the Image_Transform […]