From 225d197790a3b1eb403837607c9fd8f290a64982 Mon Sep 17 00:00:00 2001 From: jgen Date: Tue, 1 Apr 2014 21:41:57 -0400 Subject: [PATCH] Remove duplicate code. --- ext/resize/main.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ext/resize/main.php b/ext/resize/main.php index 7ceb8fba..3f015270 100644 --- a/ext/resize/main.php +++ b/ext/resize/main.php @@ -262,16 +262,6 @@ class ResizeImage extends Extension { throw new ImageResizeException("Unable to save temporary image file."); } - // TODO: Are these checks below necessary? They seem redundant? - /* Output to the same format as the original image */ - switch ( $info[2] ) { - case IMAGETYPE_GIF: imagegif($image_resized, $tmp_filename); break; - case IMAGETYPE_JPEG: imagejpeg($image_resized, $tmp_filename); break; - case IMAGETYPE_PNG: imagepng($image_resized, $tmp_filename); break; - default: - throw new ImageResizeException("Unsupported image type."); - } - /* Move the new image into the main storage location */ $new_hash = md5_file($tmp_filename); $new_size = filesize($tmp_filename);