Location: PHPKode > scripts > Mr. Thumb Image Resizing > mr-thumb-image-resizing/example.php
<?php

	include './mrthumb.class.php';
		
	// The image you are resizing. Can be a local path as well.
	$image = 'http://jordan.rave5.com/imgarch/clock.gif';

	$quality = 100; // percent
	
	// In this example we are resizing the image in proportionate sizes.
	// Below we are specifying the MAX width and height.
	$width = 100; // Pixels
	$height = 130; // Pixels

	// Start Mr. Thumb v1.0
	$mrthumb = new MrThumb();
	
	// Render the image
	$mrthumb->render( $image );
	
	// Resize the image proportionately
	// $mrthumb->constrain( $width, $height );
	$mrthumb->proportion( $width, $height );

	// Finally, output the image to the browser!
	// Optionally we can save the image to a destination
	// $mrthumb->saveto( $destination, $filename, $quality );
	$mrthumb->output( $quality );
	
	// Clean up after you are done! ;)
	$mrthumb->clear_cache();
	
?>
Return current item: Mr. Thumb Image Resizing