Add support for PNG images with alpha
This commit is contained in:
parent
1d832618a4
commit
7cc8c369cb
11 changed files with 215 additions and 70 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue