X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2FPhoto.php;h=45164333dd238d4fa937bccfa5c639839b432f77;hb=4b0cc51ae49a91aaa37e43b5aa8496fc417c536f;hp=8fd581977decbb2201415f1ee6a666c325f4acba;hpb=abba881a0224169b3492b0bfd1e198f1a8d42188;p=friendica.git diff --git a/include/Photo.php b/include/Photo.php index 8fd581977d..45164333dd 100644 --- a/include/Photo.php +++ b/include/Photo.php @@ -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'); @@ -584,6 +587,7 @@ class Photo { `album` = '%s', `height` = %d, `width` = %d, + `datasize` = %d, `data` = '%s', `scale` = %d, `profile` = %d, @@ -591,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), @@ -604,6 +608,7 @@ class Photo { dbesc($album), intval($this->getHeight()), intval($this->getWidth()), + dbesc(strlen($this->imageString())), dbesc($this->imageString()), intval($scale), intval($profile), @@ -616,8 +621,8 @@ class Photo { } else { $r = q("INSERT INTO `photo` - ( `uid`, `contact-id`, `guid`, `resource-id`, `created`, `edited`, `filename`, type, `album`, `height`, `width`, `data`, `scale`, `profile`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid` ) - VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d, '%s', '%s', '%s', '%s' )", + ( `uid`, `contact-id`, `guid`, `resource-id`, `created`, `edited`, `filename`, type, `album`, `height`, `width`, `datasize`, `data`, `scale`, `profile`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid` ) + VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, '%s', %d, %d, '%s', '%s', '%s', '%s' )", intval($uid), intval($cid), dbesc($guid), @@ -629,6 +634,7 @@ class Photo { dbesc($album), intval($this->getHeight()), intval($this->getWidth()), + dbesc(strlen($this->imageString())), dbesc($this->imageString()), intval($scale), intval($profile), @@ -673,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();