diff --git a/appimage.php b/appimage.php index 77e7b52..a159e55 100644 --- a/appimage.php +++ b/appimage.php @@ -38,6 +38,13 @@ if(!$versionId) { opendb(); +// We have input, but wrong input +if( ( $width AND !is_numeric($width) ) || ( $height AND !is_numeric($height) ) ) +{ + $width = 100; + $height = 75; +} + if($imageId AND is_numeric($imageId) ) $result = mysql_query("SELECT * FROM appData WHERE id = $imageId"); @@ -83,6 +90,11 @@ if($width && $height) $sim = ImageCreate($width, $height); ImageCopyResized($sim, $im, 0, 0, 0, 0, $width, $height, ImageSX($im), ImageSY($im)); } +else +{ + // display full image + $sim = $im; +} // output the image if($type == "png")