1
0
Fork 0

Add support for PNG images with alpha

This commit is contained in:
Fabio Comuni 2012-06-07 17:42:13 +02:00
commit 7cc8c369cb
11 changed files with 215 additions and 70 deletions

View file

@ -215,8 +215,11 @@ function parse_url_content(&$a) {
$i = fetch_url($image);
if($i) {
// guess mimetype from headers or filename
$type = guess_image_type($image,true);
require_once('include/Photo.php');
$ph = new Photo($i);
$ph = new Photo($i, $type);
if($ph->is_valid()) {
if($ph->getWidth() > 300 || $ph->getHeight() > 300) {
$ph->scaleImage(300);