#?ini charset="iso-8859-1"?
# eZ Publish configuration file for image handling
#
# NOTE: It is not recommended to edit this files directly, instead
#       a file in override should be created for setting the
#       values that is required for your site. Either create
#       a file called settings/override/image.ini.append or
#       settings/override/image.ini.append.php for more security
#       in non-virtualhost modes (the .php file may already be present
#       and can be used for this purpose).

[GDSettings]
# If set to true more advanced functionality will be available
# which is present in GD2. This requires GD2 to be compiled in
# the PHP module.
HasGD2=false

[FileSettings]
# Which subdirectory of var/cache to use for temporary image files.
TemporaryDir=imagetmp
# Wich subdirectory of var/storage to use for publish images
PublishedImages=images
# Wich subdirectory of var/storage to use for non-published (drafts, archived) images
VersionedImages=images-versioned
# Permission for new image directories, setting it to 0777 means that anyone
# can read and write the files and can be considered a security risk.
# It's preferred to use 0770 and make sure the web server has correct
# user/group access.
DirPermissions=0777
# Permission for new images, setting it to 0666 means that anyone
# can read and write the files and can be considered a security risk.
# It's preferred to use 0660 and make sure the web server has correct
# user/group access.
ImagePermissions=0666

[OutputSettings]
# A list of MIME types that are allowed as output type
# This determines which formats you want your web page to display
AllowedOutputFormat[]
AllowedOutputFormat[]=image/jpeg
AllowedOutputFormat[]=image/png
AllowedOutputFormat[]=image/gif


#
# -------- Image alias settings --------
#


[AliasSettings]
# Defines a list of aliases that are available to
# the template engine and other clients.
# The alias must be defined as a separate INI block.
AliasList[]
AliasList[]=reference
AliasList[]=small
AliasList[]=tiny
AliasList[]=medium
AliasList[]=large
AliasList[]=rss
# AliasList[]=gray
# AliasList[]=zoom

# Example of an image alias, the group is called the same as the alias name
# [myalias]
#
# Tells the system to use the original alias as reference image. The reference
# image is the base of conversion and filtering. original is the default and
# can be omitted
# Reference=reference
#
# The MIME type of the output image. Can be specified if you want a specific
# format for the alias, if not skip it and let the image system decide.
# A useful application for this is screenshots, normally you don't want
# to use image/jpeg for screenshot but rather image/png or image/gif.
# MIMEType=image/png
#
# A list of filters to run, each filter must be supported by the active image converters
# Filters[]=geometry/scale=300;300

# reference, small, medium and large for backwards compatability
# You can for instance remove the reference if don't want the extra disk usage

# By defining the 'original' alias and setting some filters
# or changing the MIME type you can even force a conversion of
# the originally uploaded image.
# This is useful to save space or make sure the image is in a specific format
# [original]
# Filters[]
# Filters[]=colorspace/gray

# [original]
# Filters[]
# Filters[]=filter/swirl=210
# # MIMEType=image/png

[reference]
Filters[]
Filters[]=geometry/scaledownonly=600;600

[small]
Reference=reference
Filters[]=geometry/scaledownonly=100;100

[tiny]
Reference=reference
Filters[]=geometry/scaledownonly=30;30

[medium]
Reference=reference
Filters[]=geometry/scaledownonly=200;200

[large]
Reference=reference
Filters[]=geometry/scaledownonly=300;300

[rss]
Reference=reference
Filters[]=geometry/scale=88;31
# According to the RSS 1.0 / RSS 2.0 specification:
# maximum value for width is 144, default value is 88,
# maximum value for height is 400, default value is 31.


# An example alias which converts the image to grayscale
#
# [gray]
# Reference=large
# Filters[]
# Filters[]=colorspace/gray

# An example alias which crops the image to specific size
# and adds a border.
#
# [zoom]
# Reference=reference
# Filters[]
# Filters[]=geometry/crop=200;200;155;155
# Filters[]=border/color=0;0;0
# Filters[]=border=4;4


#
# -------- Image MIME type settings --------
#


[MIMETypeSettings]
# A list of settings which override certain MIME types
# The overrides can define allowed and disallowed filters
# as well as extra filters.l
OverrideList[]=AnimatedGIF
OverrideList[]=LayeredPhotoshop

# A list of mimetypes and their image quality value
# The value varies from mime type to mime type.
Quality[]
# Set JPEG quality from 0 (worst quality, smallest file) to 100 (best quality, biggest file)
Quality[]=image/jpeg;75

# The global conversion rules
# Most will be converted to jpeg except gif and xpms
ConversionRules[]
ConversionRules[]=image/gif;image/png
ConversionRules[]=image/x-xpixmap;image/png
ConversionRules[]=*;image/jpeg
# Fallback if jpeg is disabled as output.
# ConversionRules[]=image/jpeg;image/png


# Override for animated GIFs, this is needed to properly
# handle image/gif files with multiple image frames.
# It will turn off any geometry filters to leave the images untouched.
[AnimatedGIF]
# The MIME type which this override works on
MIMEType=image/gif
# A list of matches that needs to be satisified for this override to be used
Match[is_animated]=1
# Alternative MIME type for the image, currently unused.
OverrideMIMEType=animation/gif
# A list of filters which are not allowed to be run on this image,
# wildcards can also be used.
DisallowedFilters[]=*
# A list of filters which are allowed to be run on this image,
# wildcards can also be used. If this is supplied only filters that
# are in this list will be allowed
# AllowedFilters[]

# A list of extra filters to add for this image.
ExtraFilters[]

[LayeredPhotoshop]
MIMEType=application/x-photoshop
ExtraFilters[]
ExtraFilters[]=flatten
ExtraFilters[]=resize=200x

#
# -------- Image converter settings --------
#

[ShellSettings]
ConvertPath=

[ImageConverterSettings]
# List of converters to use, each entry is the name of the converter
# which is defined in a ini block.
# You can use ImageMagick and GD handlers by default.
# The order of the convertes are important since the first
# applicable converter will be used. The last handler is
# usually a fallback converter which can take care of most formats.
# The list can also contain converters which cannot work
# on the installed server, the converter should check this
# and tell the image system to not use it.
#
# For any other converter make sure you have a INI section
# with the same name as your converter's
#
# For example : 
# ImageConverters[]=MyCustomConverter
# [MyCustomConverter]
# with the same INI variables as GD or ImageMagick INI sections

ImageConverters[]
ImageConverters[]=ImageMagick
ImageConverters[]=GD

# DEPRECATED (not needed/supported in 4.1 for autoload based handler loading)
# RepositoryList[]=lib/ezimage/classes
# ExtensionList[]
# ImageHandlerAlias[]

# Waiting time for processes in queue to get an exclusive writing lock
# for writing a specific image alias.
#
# If a process spends longer than this time waiting, the process holding the lock
# will be ended, and the waiting process will continue, generating the image alias.
LockTimeout=60

[GD]
Name=GD
IsEnabled=true
# Which PHP handler to use for the conversion,
# ezimagegd means to use the ImageGD extension in PHP
Handler=eZImageGDFactory

# The following filters are supported by GD
# geometry/scale
# geometry/scalewidth
# geometry/scaleheight
# geometry/scaledownonly
# geometry/scalewidthdownonly
# geometry/scaleheightdownonly
# geometry/scaleexact
# geometry/scalepercent
# geometry/crop
# colorspace/gray
# luminance/gray
# luminance/sepia
# color/monochrome
# border
# border/color
# border/width

[ImageMagick]
Name=ImageMagick
# If set to true then this handler will be used,
# The setup wizard will turn this off it ImageMagick is not found on the system
IsEnabled=true
# Which PHP handler to use for the conversion,
# ezimageshell means to use the generic shell handler which
# creates a command line and executes it with system().
Handler=eZImageShellFactory
# The path to the executable, can be empty for global path.
ExecutablePath=
# Name of the executable
Executable=convert
# Name of the executable for windows,
# uncomment ExecutableMac for Mac specific converter and
# ExecutableUnix for Unix/Linux specific converter
# ExecutableMac=convert
# ExecutableUnix=convert
# Parameters that must be run before the filenames and filters.
PreParameters=
# Parameters that must be run after the filenames and filters.
PostParameters=
# Whether the destination name should be prefixed with a TAG name (see MIMETagMap below)
# The variable contains the separator between the TAG and the filename.
# This is needed for ImageMagick to provide proper conversions of some formats.
UseTypeTag=:

# MIME types that the converter can get as input
InputMIMEList[]
InputMIMEList[]=*

# MIME types that the converter can generate
OutputMIMEList[]
OutputMIMEList[]=*

# A list of mime types and their quality parameters
QualityParameters[]
QualityParameters[]=image/jpeg;-quality %1

# This setting will provide the possibility to postpend options to the source file  filename.
# This behavior is needed to address a specific layer in PSD files.
# This array needs a semicolon seperated value which will build like this:
# <mimetype>;<option>
FrameRangeParameters[]

# Set frame range to handle PSD files with ImageMagick
FrameRangeParameters[]=application/x-photoshop;[0]

# A list of filter ImageMagick supports, add more if needed
# The same filter names are used in aliases and MIME type overrides with optional parameters.
Filters[]=geometry/scale=-geometry %1x%2
Filters[]=geometry/scalewidth=-geometry %1
Filters[]=geometry/scaleheight=-geometry x%1
Filters[]=geometry/scaledownonly=-geometry %1x%2>
Filters[]=geometry/scalewidthdownonly=-geometry %1>
Filters[]=geometry/scaleheightdownonly=-geometry x%1>
Filters[]=geometry/scaleexact=-geometry %1x%2!
Filters[]=geometry/scalepercent=-geometry %1x%2%
Filters[]=geometry/crop=-crop %1x%2+%3+%4
Filters[]=filter/noise=-noise %1
Filters[]=filter/swirl=-swirl %1
Filters[]=colorspace/gray=-colorspace GRAY
Filters[]=colorspace/transparent=-colorspace Transparent
Filters[]=colorspace=-colorspace %1
Filters[]=border=-border %1x%2
Filters[]=border/color=-bordercolor rgb(%1,%2,%3)
Filters[]=border/width=-borderwidth %1
Filters[]=flatten=-flatten
Filters[]=resize=-resize %1

# Maps a MIME type to a tag name which is prepended to the destination name for ImageMagick
MIMETagMap[]=image/x-xpixmap;XPM
MIMETagMap[]=image/png;PNG
MIMETagMap[]=image/jpeg;JPEG
MIMETagMap[]=image/bmp;BMP
MIMETagMap[]=image/gif;GIF
MIMETagMap[]=image/x-portable-bitmap;PBM
MIMETagMap[]=image/tiff;TIFF
MIMETagMap[]=image/pcx;PCX
MIMETagMap[]=image/x-pict;PICT
MIMETagMap[]=image/svg+xml;SVG
MIMETagMap[]=image/tga;TGA
MIMETagMap[]=image/vnd.wap.wbmp;WBMP
MIMETagMap[]=image/x-xbitmap;XBM
MIMETagMap[]=image/x-xcf-gimp;XCF
MIMETagMap[]=application/x-photoshop;PSD
MIMETagMap[]=application/pdf;PDF
MIMETagMap[]=application/postscript;PS
MIMETagMap[]=text/plain;TEXT


#
# -------- Image analysis settings --------
#


[AnalyzerSettings]
# Where to look for analyzers
RepositoryList[]=lib/ezimage/classes
# A list of extensions which have analyzers, it will look in the imageanalyzer subdir.
ExtensionList[]
# A list of active analyzers
ImageAnalyzers[]=GIF
ImageAnalyzers[]=EXIF
# A list of aliases for analyzer, can be used to redirect certain
# analyzers to your own.
ImageAnalyzerAlias[]

# A list of formats that need extra analysis
AnalyzerMIMEList[]
# GIF images must be analyzed to check for
# animated GIFs, animated GIFs are hard to convert
# to other formats.
AnalyzerMIMEList[]=image/gif

# GIF analyzer, figures out details about GIF images
# Is primarily used to determine GIF animation.
[GIFAnalyzer]
Handler=ezgif
MIMEList[]=image/gif

# Analyzer for EXIF data, currently supports JPEG and TIFF
[EXIFAnalyzer]
Handler=ezexif
MIMEList[]=image/jpeg
MIMEList[]=image/tiff
