Skip to content

Commit

Permalink
write to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
dm1tru committed Feb 7, 2024
1 parent ff40532 commit f18d7df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions convert.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

ini_set("display_errors","on");

$GIF = new Imagick();
$GIF->setFormat("GIF");

Expand All @@ -12,20 +14,13 @@
continue;
}

echo "ADD $file \n<br>";

$frame = new Imagick();
$frame->readImage($dir . $file);
$frame->setImageDelay(100);
$GIF->addImage($frame);
}

echo "CONVERT...\n<br>";

//header("Content - Type: image / gif");
$str = $GIF->getImagesBlob();
file_put_contents(__DIR__ . "/out/file.gif", $str);

header('Content-Type: image/gif');
echo $GIF->getImagesBlob();

echo "<a href='out/file.gif'>Download</a>";

Empty file removed out/.gitkeep
Empty file.

0 comments on commit f18d7df

Please sign in to comment.