mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-25 14:08:19 +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:
parent
01cbe72d9f
commit
c7b0daadb8
1 changed files with 0 additions and 8 deletions
|
@ -107,14 +107,6 @@ final class PhabricatorImageTransformer {
|
||||||
|
|
||||||
private function saveImageDataInAnyFormat($data, $preferred_mime = '') {
|
private function saveImageDataInAnyFormat($data, $preferred_mime = '') {
|
||||||
switch ($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/gif': // GIF doesn't support true color.
|
||||||
case 'image/png':
|
case 'image/png':
|
||||||
if (function_exists('imagepng')) {
|
if (function_exists('imagepng')) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue