1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Remove duplicate code in image transform

Test Plan: /file/xform/thumb-160x120/ of JPG image

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D2071
This commit is contained in:
vrana 2012-04-02 10:04:46 -07:00
parent 01cbe72d9f
commit c7b0daadb8

View file

@ -107,14 +107,6 @@ final class PhabricatorImageTransformer {
private function saveImageDataInAnyFormat($data, $preferred_mime = '') {
switch ($preferred_mime) {
case 'image/jpg':
case 'image/jpeg':
if (function_exists('imagejpeg')) {
ob_start();
imagejpeg($data);
return ob_get_clean();
}
break;
case 'image/gif': // GIF doesn't support true color.
case 'image/png':
if (function_exists('imagepng')) {