X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fnetwork.php;h=16c8185e1abb48b0fec1ada966fe06a0e9ffce35;hb=e44da4a49825ed575e0168e8d2f5644c14bbc524;hp=c11cdb2c6c50c462c10745e47ff03f5aa5fe2399;hpb=ddacbf2c136c05a8ecf0aa65f8afdbce6134b95c;p=friendica.git diff --git a/include/network.php b/include/network.php index c11cdb2c6c..16c8185e1a 100644 --- a/include/network.php +++ b/include/network.php @@ -1,13 +1,12 @@ is_valid()) { - $orig_width = $ph->getWidth(); - $orig_height = $ph->getHeight(); + $Image = new Image($i, $type); + if ($Image->isValid()) { + $orig_width = $Image->getWidth(); + $orig_height = $Image->getHeight(); if ($orig_width > 640 || $orig_height > 640) { - $ph->scaleImage(640); - $new_width = $ph->getWidth(); - $new_height = $ph->getHeight(); + $Image->scaleDown(640); + $new_width = $Image->getWidth(); + $new_height = $Image->getHeight(); logger('scale_external_images: ' . $orig_width . '->' . $new_width . 'w ' . $orig_height . '->' . $new_height . 'h' . ' match: ' . $mtch[0], LOGGER_DEBUG); $s = str_replace( $mtch[0],