ILIAS
Release_5_0_x_branch Revision 61816
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilImageMagickRenderer.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
include_once(
"./Services/Preview/classes/class.ilFilePreviewRenderer.php"
);
5
14
class
ilImageMagickRenderer
extends
ilFilePreviewRenderer
15
{
16
// constants
17
const
SUPPORTED_FORMATS
=
"jpg,jpeg,jp2,png,gif,bmp,tif,tiff,cur,ico,pict,tga,psd"
;
18
19
// variables
20
private
static
$supported_formats
= null;
21
27
public
function
getSupportedFileFormats
()
28
{
29
// build formats only once
30
if
(self::$supported_formats == null)
31
self::$supported_formats =
self::evaluateSupportedFileFormats
();
32
33
return
self::$supported_formats
;
34
}
35
41
public
static
function
evaluateSupportedFileFormats
()
42
{
43
$formats = explode(
","
, self::SUPPORTED_FORMATS);
44
return
$formats;
45
}
46
54
protected
function
renderImages
($obj)
55
{
56
$filepath = $obj->getFile();
57
$tmpPath = $this->
prepareFileForExec
($filepath);
58
$isTemporary = $tmpPath != $filepath;
59
return
array(
new
ilRenderedImage
($tmpPath .
"[0]"
, $isTemporary));
60
}
61
}
62
?>
Services
Preview
classes
class.ilImageMagickRenderer.php
Generated on Wed Apr 27 2016 21:02:05 for ILIAS by
1.8.1.2 (using
Doxyfile
)