Archive for June, 2007

Imagick new features / An example of Imagick::roundCorners

I added a couple of comfortablity methods to the Imagick extension. The first one is Imagick::cropThumbnailImage which can be used to create fixed size thumbnails from any image geometry.

The second one was Imagick::roundCorners. It was a little tricky to implement but after staying up all night banging my head to the wall I finally succeeded. It's now possible to create round corners with ease:

PHP:
  1. <?php
  2.  
  3. /* Create a new object and read the image */
  4. $im = new Imagick( 'img.png' );
  5.  
  6. /* Round the corners. (yes, this is all that is needed.) */
  7. $im->roundCorners( 30, 30 );
  8.  
  9. /* Output the image */
  10. header( "Content-Type: image/png" );
  11. echo $im;
  12.  
  13. ?>

Some Imagick examples

I've been writing some examples for the Imagick presentation I am creating. Here's my pretty flower: http://todellisuus.net/~mikko/flower.php?scale=1. The flower example is the first real drawing example I've made and it demonstrates how you can extend Imagick basic components to create your own shapes.

After eZ Awards 2007 and PHP Vikinger

I came back from Skien, Norway a few days ago. I really enjoyed the awards and especially the PHP Vikinger after party. I met new people, made new friends and won a prize :)

I've been writing a presentation about Imagick for a few days. I timed it today and it was about 50 minutes without questions. I'm hoping to make it a one and a half hour presentation which I can then supply to a few conferences.