X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FObject%2FImage.php;h=4645a8678a59fd1e330614315a364dfb01005a07;hb=d936cc5a5c2755a0056ff12a297bf0fa25dc6bf1;hp=c1da711f9ca14472326283feed129c0fa88d4d59;hpb=e6f4ed47e2fa4c57665fc81c97165f6e4a4c2a5f;p=friendica.git diff --git a/src/Object/Image.php b/src/Object/Image.php index c1da711f9c..4645a8678a 100644 --- a/src/Object/Image.php +++ b/src/Object/Image.php @@ -575,6 +575,21 @@ class Image return true; } + /** + * Convert a GIF to a PNG to make it static + */ + public function toStatic() + { + if ($this->type != 'image/gif') { + return; + } + + if ($this->isImagick()) { + $this->type == 'image/png'; + $this->image->setFormat('png'); + } + } + /** * @param integer $max maximum * @param integer $x x coordinate