summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/graphics.php
diff options
context:
space:
mode:
authorjhilden <jakobhilden@gmail.com>2009-06-29 16:03:45 -0400
committerjhilden <jakobhilden@gmail.com>2009-06-29 16:03:45 -0400
commitb31b3bd5bff4f8d5b5721e0fdd86579028a5b03a (patch)
tree9baa2a301c1e26dcf872e0bbfbb09be34cb020d5 /modules/gallery/helpers/graphics.php
parenteb82f6a64a6b4e0b4e18ca92689bd467cba6e1bd (diff)
parent5de6de6a133c6c906ee63b5a2ab1b08bc14ca17e (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/helpers/graphics.php')
-rw-r--r--modules/gallery/helpers/graphics.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php
index feebfb34..71b8ddd8 100644
--- a/modules/gallery/helpers/graphics.php
+++ b/modules/gallery/helpers/graphics.php
@@ -135,7 +135,12 @@ class graphics_Core {
if ($input_item->is_movie()) {
// Convert the movie to a JPG first
$output_file = preg_replace("/...$/", "jpg", $output_file);
- movie::extract_frame($input_file, $output_file);
+ try {
+ movie::extract_frame($input_file, $output_file);
+ } catch (Exception $e) {
+ // Assuming this is MISSING_FFMPEG for now
+ copy(MODPATH . "gallery/images/missing_movie.png", $output_file);
+ }
$working_file = $output_file;
} else {
$working_file = $input_file;
@@ -326,7 +331,7 @@ class graphics_Core {
if (!isset($gd["GD Version"])) {
$gd["GD Version"] = false;
}
- putenv("PATH=" . getenv("PATH") . ":/usr/local/bin");
+ putenv("PATH=" . getenv("PATH") . ":/usr/local/bin:/opt/local/bin");
return array("gd" => $gd,
"imagemagick" => $exec ? dirname(exec("which convert")) : false,
"graphicsmagick" => $exec ? dirname(exec("which gm")) : false);