2
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
4
* Movie_HelioviewerMovie Class Definition
10
* @author Jaclyn Beck <jabeck@nmu.edu>
11
* @license http://www.mozilla.org/MPL/MPL-1.1.html Mozilla Public License 1.1
12
* @link http://launchpad.net/helioviewer.org
14
require 'lib/Image/CompositeImage.php';
16
* Class is used when generating composite images, or 'frames', for movies.
19
* @package Helioviewer
20
* @author Jaclyn Beck <jabeck@nmu.edu>
21
* @license http://www.mozilla.org/MPL/MPL-1.1.html Mozilla Public License 1.1
22
* @link http://launchpad.net/helioviewer.org
24
class Movie_HelioviewerMovieFrame extends Image_CompositeImage
27
protected $layerImages;
28
protected $cacheFileDir;
32
* Movie_HelioviewerMovieFrame Constructor
34
* @param int $zoomLevel Zoom-level for which the movie frame should be created\
35
* @param array $options An array with true/false values for "EdgeEnhance" and "Sharpen"
36
* @param array $layerImages An array of layer information strings in the format:
37
* "uri,xStart,xSize,yStart,ySize,opacity,opacityGrp"
38
* @param int $frameNum Which frame this movieFrame belongs to
39
* @param int $folderId Unix timestamp of when the movie was requested, and is used to make a
40
* folder to store the movie in.
41
* @param array $imageSize Array of width and height of the image
42
* @param array $timestamps Array containing the actual timestamps of each layer, obtained from the database
43
* @param int $quality Movie quality
45
public function __construct(
46
$zoomLevel, $options, $layerImages, $frameNum, $folderId, $imageSize, $timestamps, $quality
48
$this->frameNum = $frameNum;
49
$this->layerImages = $layerImages;
50
$this->imageSize = $imageSize;
51
$this->timestamps = $timestamps;
52
$this->quality = $quality;
54
$tmpDir = HV_CACHE_DIR . "movies/";
56
parent::__construct($zoomLevel, $options, $tmpDir);
58
// Directory to store all of the final frame images before they are compiled into a video
59
$this->cacheFileDir = $tmpDir . $folderId . "/";
61
if (!file_exists($this->cacheFileDir)) {
62
mkdir($this->cacheFileDir);
63
chmod($this->cacheFileDir, 0777);
66
$this->compileImages();
b'\\ No newline at end of file'