Add support for PNG images with alpha
This commit is contained in:
@@ -807,8 +807,11 @@ function scale_external_images($s,$include_link = true) {
|
||||
if(stristr($mtch[1],$hostname))
|
||||
continue;
|
||||
$i = fetch_url($mtch[1]);
|
||||
// guess mimetype from headers or filename
|
||||
$type = guess_image_type($mtch[1],true);
|
||||
|
||||
if($i) {
|
||||
$ph = new Photo($i);
|
||||
$ph = new Photo($i, $type);
|
||||
if($ph->is_valid()) {
|
||||
$orig_width = $ph->getWidth();
|
||||
$orig_height = $ph->getHeight();
|
||||
|
||||
Reference in New Issue
Block a user