$source_aspect_ratio ) { $thumbnail_image_width = ( int ) ( $thumbnail_image_height * $source_aspect_ratio ); }else { $thumbnail_image_height = ( int ) ( $thumbnail_image_width / $source_aspect_ratio ); } $thumbnail_gd_image = imagecreatetruecolor( $thumbnail_image_width, $thumbnail_image_height ); /*var_export(imagecopyresampled( $thumbnail_gd_image, $source_gd_image, 0, 0, 0, 0, $thumbnail_image_width, $thumbnail_image_height, $source_image_width, $source_image_height ) ); exit();*/ imagecopyresampled( $thumbnail_gd_image, $source_gd_image, 0, 0, 0, 0, $thumbnail_image_width, $thumbnail_image_height, $source_image_width, $source_image_height ); //var_export( imagejpeg( $thumbnail_gd_image, $thumbnail_image_path, 90 )); exit(); imagejpeg( $thumbnail_gd_image, $thumbnail_image_path, 90 ); imagedestroy( $source_gd_image ); imagedestroy( $thumbnail_gd_image ); return true; } /// Functions to display error messages function successMsg($e) { if($e == 1){ $msg = "Password has been sent to your email."; }if($e == 2){ $msg = "Password has been updated."; }if($e == 3){ $msg = "Email has been updated."; }if($e == 4){ $msg = "Record has been added."; }if($e == 5){ $msg = "Record has been updated."; }if($e == 6){ $msg = "Record has been deleted."; } //echo "
$msg
"; ?>