mirror of
https://github.com/friendica/friendica
synced 2025-04-24 03:50:12 +00:00
some more coding style correction
This commit is contained in:
parent
5459b00499
commit
e446e9571f
2 changed files with 65 additions and 65 deletions
|
@ -78,6 +78,7 @@ class Photo {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Maps Mime types to Imagick formats
|
* @brief Maps Mime types to Imagick formats
|
||||||
|
* @return arr With with image formats (mime type as key)
|
||||||
*/
|
*/
|
||||||
public function get_FormatsMap() {
|
public function get_FormatsMap() {
|
||||||
$m = array(
|
$m = array(
|
||||||
|
@ -93,8 +94,7 @@ class Photo {
|
||||||
$this->image = new Imagick();
|
$this->image = new Imagick();
|
||||||
try {
|
try {
|
||||||
$this->image->readImageBlob($data);
|
$this->image->readImageBlob($data);
|
||||||
}
|
} catch (Exception $e) {
|
||||||
catch (Exception $e) {
|
|
||||||
// Imagick couldn't use the data
|
// Imagick couldn't use the data
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -590,7 +590,7 @@ class Photo {
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
$quality = FALSE;
|
$quality = false;
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
|
@ -603,14 +603,14 @@ class Photo {
|
||||||
if ((!$quality) || ($quality > 9)) {
|
if ((!$quality) || ($quality > 9)) {
|
||||||
$quality = PNG_QUALITY;
|
$quality = PNG_QUALITY;
|
||||||
}
|
}
|
||||||
imagepng($this->image,NULL, $quality);
|
imagepng($this->image, null, $quality);
|
||||||
break;
|
break;
|
||||||
case "image/jpeg":
|
case "image/jpeg":
|
||||||
$quality = get_config('system', 'jpeg_quality');
|
$quality = get_config('system', 'jpeg_quality');
|
||||||
if ((!$quality) || ($quality > 100)) {
|
if ((!$quality) || ($quality > 100)) {
|
||||||
$quality = JPEG_QUALITY;
|
$quality = JPEG_QUALITY;
|
||||||
}
|
}
|
||||||
imagejpeg($this->image,NULL,$quality);
|
imagejpeg($this->image, null, $quality);
|
||||||
}
|
}
|
||||||
$string = ob_get_contents();
|
$string = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue