fix gallery scan when an image cant be loaded
This commit is contained in:
parent
73c6db5c8e
commit
eb3ec05f88
|
@ -78,9 +78,9 @@ class OC_Gallery_Scanner {
|
||||||
$image = OC_Gallery_Photo::getThumbnail($files[$i]);
|
$image = OC_Gallery_Photo::getThumbnail($files[$i]);
|
||||||
if ($image && $image->valid()) {
|
if ($image && $image->valid()) {
|
||||||
imagecopyresampled($thumbnail, $image->resource(), $i*200, 0, 0, 0, 200, 200, 200, 200);
|
imagecopyresampled($thumbnail, $image->resource(), $i*200, 0, 0, 0, 200, 200, 200, 200);
|
||||||
}
|
|
||||||
$image->destroy();
|
$image->destroy();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
imagepng($thumbnail, OC_Config::getValue("datadirectory").'/'. OC_User::getUser() .'/gallery/' . $albumName.'.png');
|
imagepng($thumbnail, OC_Config::getValue("datadirectory").'/'. OC_User::getUser() .'/gallery/' . $albumName.'.png');
|
||||||
imagedestroy($thumbnail);
|
imagedestroy($thumbnail);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue