thumb patch (still not working)
This commit is contained in:
parent
e5f7052516
commit
51e36e4da2
@ -86,7 +86,6 @@ function plugin_thumb_create($fpath, $infos, $new_width, $new_height) {
|
|||||||
|
|
||||||
|
|
||||||
$scaled = imagecreatetruecolor($new_width, $new_height);
|
$scaled = imagecreatetruecolor($new_width, $new_height);
|
||||||
imagecopyresampled($scaled, $image, 0, 0, 0, 0, $new_width, $new_height, $infos[0], $infos[1]);
|
|
||||||
/*
|
/*
|
||||||
* If gif or png preserve the alpha channel
|
* If gif or png preserve the alpha channel
|
||||||
*
|
*
|
||||||
@ -102,6 +101,8 @@ function plugin_thumb_create($fpath, $infos, $new_width, $new_height) {
|
|||||||
$output='jpg';
|
$output='jpg';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
imagecopyresampled($scaled, $image, 0, 0, 0, 0, $new_width, $new_height, $infos[0], $infos[1]);
|
||||||
|
|
||||||
if($output=='png') {
|
if($output=='png') {
|
||||||
imagepng($scaled, $thumbpath);
|
imagepng($scaled, $thumbpath);
|
||||||
} elseif($output=='gif') {
|
} elseif($output=='gif') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user