]> git.mxchange.org Git - friendica.git/blobdiff - include/Photo.php
The CSS code for shared messages is moved from "vier" to the global.css, so that...
[friendica.git] / include / Photo.php
index 69b08f62919bc7fe81855238ff9fea847dff556c..45164333dd238d4fa937bccfa5c639839b432f77 100644 (file)
@@ -534,6 +534,9 @@ class Photo {
 
         ob_start();
 
+       // Enable interlacing
+       imageinterlace($this->image, true);
+
         switch($this->getType()){
             case "image/png":
                 $quality = get_config('system','png_quality');
@@ -592,7 +595,7 @@ class Photo {
                 `allow_gid` = '%s',
                 `deny_cid` = '%s',
                 `deny_gid` = '%s'
-                where id = %d limit 1",
+                where id = %d",
 
                 intval($uid),
                 intval($cid),
@@ -676,6 +679,7 @@ function guess_image_type($filename, $fromcurl=false) {
              */
             $image = new Imagick($filename);
             $type = $image->getImageMimeType();
+            $image->setInterlaceScheme(Imagick::INTERLACE_PLANE);
         } else {
             $ext = pathinfo($filename, PATHINFO_EXTENSION);
             $types = Photo::supportedTypes();