<?php

	include "library.php";

	$cxn = start_code( true );

	generate_small_jpegs( $cxn );

/*
	$pathroot = val( $_SESSION, "pathroot" );

	$destfile = $pathroot."/photos/photo_2511_1_l.jpg";

	list( $width, $height, $type, $attr ) = getimagesize( $destfile );

	$image = imagecreatefromjpeg( $destfile );

	$aspect_ratio = $width / $height;

	$new_width = 120 * $aspect_ratio;
	$new_height = 120;

	$im = imagecreatetruecolor( $new_width, $new_height );

	imagecopyresampled( $im, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height );

	$xwidth = 120;

	imagejpeg( $im, $pathroot."/tmp/tmp_100.jpg", 100 );
	echo "100 <img src='/tmp/tmp_100.jpg' width='".$xwidth."'><br>";

	imagejpeg( $im, $pathroot."/tmp/tmp_90.jpg", 90 );
	echo "90 <img src='/tmp/tmp_90.jpg' width='".$xwidth."'><br>";

	imagejpeg( $im, $pathroot."/tmp/tmp_80.jpg", 80 );
	echo "80 <img src='/tmp/tmp_80.jpg' width='".$xwidth."'><br>";

	imagejpeg( $im, $pathroot."/tmp/tmp_70.jpg", 70 );
	echo "70 <img src='/tmp/tmp_70.jpg' width='".$xwidth."'><br>";

	imagejpeg( $im, $pathroot."/tmp/tmp_60.jpg", 60 );
	echo "60 <img src='/tmp/tmp_60.jpg' width='".$xwidth."'><br>";

	imagejpeg( $im, $pathroot."/tmp/tmp_50.jpg", 50 );
	echo "50 <img src='/tmp/tmp_50.jpg' width='".$xwidth."'><br>";

	imagejpeg( $im, $pathroot."/tmp/tmp_40.jpg", 40 );
	echo "40 <img src='/tmp/tmp_40.jpg' width='".$xwidth."'><br>";

	imagejpeg( $im, $pathroot."/tmp/tmp_30.jpg", 30 );
	echo "30 <img src='/tmp/tmp_30.jpg' width='".$xwidth."'><br>";

	imagejpeg( $im, $pathroot."/tmp/tmp_20.jpg", 20 );
	echo "20 <img src='/tmp/tmp_20.jpg' width='".$xwidth."'><br>";

	imagejpeg( $im, $pathroot."/tmp/tmp_10.jpg", 10 );
	echo "10 <img src='/tmp/tmp_10.jpg' width='".$xwidth."'><br>";
*/

?>

finished

