imagemagick SVG thumbnailing, but needs more version check...
git-svn-id: file:///home/shish/svn/shimmie2/trunk@659 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
c894fd2752
commit
b31a0fd1ac
@ -30,8 +30,21 @@ class SVGFileHandler extends Extension {
|
||||
if(is_a($event, 'ThumbnailGenerationEvent') && $event->type == "svg") {
|
||||
$hash = $event->hash;
|
||||
$ha = substr($hash, 0, 2);
|
||||
// FIXME: scale image, as not all boards use 192x192
|
||||
copy("ext/handle_svg/thumb.jpg", "thumbs/$ha/$hash");
|
||||
|
||||
global $config;
|
||||
|
||||
// if($config->get_string("thumb_engine") == "convert") {
|
||||
// $w = $config->get_int("thumb_width");
|
||||
// $h = $config->get_int("thumb_height");
|
||||
// $q = $config->get_int("thumb_quality");
|
||||
// $mem = $config->get_int("thumb_max_memory") / 1024 / 1024; // IM takes memory in MB
|
||||
//
|
||||
// exec("convert images/{$ha}/{$hash}[0] -geometry {$w}x{$h} -quality {$q} jpg:thumbs/{$ha}/{$hash}");
|
||||
// }
|
||||
// else {
|
||||
// FIXME: scale image, as not all boards use 192x192
|
||||
copy("ext/handle_svg/thumb.jpg", "thumbs/$ha/$hash");
|
||||
// }
|
||||
}
|
||||
|
||||
if(is_a($event, 'DisplayingImageEvent') && $event->image->ext == "svg") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user