Skip to main content

Dummies and scapegoats most wanted

Of late I'm noticing that there's a huge demand for dummies and scapegoats. I suppose, this is due to cynical world that is leaning towards sneaky approaches.

Comments

Popular posts from this blog

Tim Van Wassenhove's (PHP) Blogmarks

Tim Van Wassenhove , a c.l.php regular maintains wonderful blogmarks . Most of the blogs are PHP related and it is faster to access than my Sage, RSS reader . It is interesting to see that Tim has blogmarked my—this simple blog too:) IMHO, it would be better to display timestamps along with the links and to have a TOC of blogs in the top.

I'm Zend (PHP 5) Certified Engineer:-)

As of January 13, 2007, I'm ZCE/ Zend Certified Engineer (PHP 5)

Converting PSD with PHP/ImageMagick

After seeing feature rich options in Imagick PECL extension at Mikko Koppanen 's (the author) website and also impressed with ImageMagick 's features, I have decided to use it for the PSD to XHTML conversion website that I'm architecting and managing. Since, the team wants programming help for converting PSD images, I have tried it (documentation is sparse on PSD handling) Converting PSD to PNG/JPEG/etc Note that, flattenImages() is needed for layered/multi-page PSD file. <?php $im = new Imagick('test.psd'); $im->flattenImages(); $im->setImageFormat('png'); $im->writeImage('test.png'); ?> Extracting PSD layers One by one <?php $im = new Imagick('test.psd'); $im->setImageFormat('png'); for ($i = 0, $num_layers = $im->getNumberImages(); $i $im->setImageIndex($i); $im->writeImage('layer' . $i . '.png'); } ?> Note that, there is a better version below In a single call with writeIm...