Skip to content

Commit

Permalink
tweaks to the imagemagick diffing to work on both linux and windows
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeenan committed Sep 11, 2013
1 parent 8411631 commit c7240fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions www/video/avi2frames.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function CopyAVIFrame($src, $dest) {

function IsBlankAVIFrame($file) {
$ret = false;
$command = "convert \"images/video_white.png\" ( \"$file\" -crop +0+100 -shave 5x5 -resize 200x200! ) miff:- | compare -metric AE - -fuzz 10% null: 2>&1";
$command = "convert \"images/video_white.png\" \\( \"$file\" -crop +0+100 -shave 5x5 -resize 200x200! \\) miff:- | compare -metric AE - -fuzz 10% null: 2>&1";
$differentPixels = shell_exec($command);
if (isset($differentPixels) && strlen($differentPixels) && $differentPixels < 100)
$ret = true;
Expand All @@ -170,7 +170,7 @@ function IsBlankAVIFrame($file) {
*/
function IsOrangeAVIFrame($file) {
$ret = false;
$command = "convert \"images/video_orange.png\" ( \"$file\" -crop +0+100 -shave 5x5 -resize 200x200! ) miff:- | compare -metric AE - -fuzz 10% null: 2>&1";
$command = "convert \"images/video_orange.png\" \\( \"$file\" -crop +0+100 -shave 5x5 -resize 200x200! \\) miff:- | compare -metric AE - -fuzz 10% null: 2>&1";
$differentPixels = shell_exec($command);
if (isset($differentPixels) && strlen($differentPixels) && $differentPixels < 100)
$ret = true;
Expand Down

0 comments on commit c7240fa

Please sign in to comment.