File: thumbnail.php

package info (click to toggle)
php-imagick 3.2.0~rc1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,516 kB
  • ctags: 1,105
  • sloc: ansic: 14,099; xml: 110; php: 83; sh: 10; makefile: 7
file content (22 lines) | stat: -rw-r--r-- 430 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
 
/*
	A simple example demonstrate thumbnail creation.
*/ 
 
/* Create the Imagick object */
$im = new Imagick();
 
/* Read the image file */
$im->readImage( '/tmp/test.png' );
 
/* Thumbnail the image ( width 100, preserve dimensions ) */
$im->thumbnailImage( 100, null );
 
/* Write the thumbail to disk */
$im->writeImage( '/tmp/th_test.png' );
 
/* Free resources associated to the Imagick object */
$im->destroy();
 
?>