xref: /imagick/examples/thumbnail.php (revision b25e3efa)
1<?php
2
3/*
4	A simple example demonstrate thumbnail creation.
5*/
6
7/* Create the Imagick object */
8$im = new Imagick();
9
10/* Read the image file */
11$im->readImage( '/tmp/test.png' );
12
13/* Thumbnail the image ( width 100, preserve dimensions ) */
14$im->thumbnailImage( 100, null );
15
16/* Write the thumbail to disk */
17$im->writeImage( '/tmp/th_test.png' );
18
19/* Free resources associated to the Imagick object */
20$im->destroy();
21
22?>