<?php
## thumbnail.php
require("csImage.lib.php");
header("Content-Type: image/jpeg"); # Change content-type according to your image.
# Parameters:
#
# $image: the filename of the image to open.
# $scale: "w" for scaling by width, "h" for scaling by height.
# $sizeInPixels: max size of the given proportion at $scale.
# $writeToNewFile: true for creating an image file and returning the path, false for returning the image binary content.
echo csImage::scaleImage($image, "h", 100, false);
?>