ibexa

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

Filters

Summary

Sets the filters supported by ImageMagick.

Usage

 

Filters[]=<filter>=<filter-parameter>

Description

A list of filters to run which ImageMagick supports. Add all that are needed.The same filter names are used as the filters for the aliases and MIME types, but optional parameters are added.

The parameter to use is the pixel size of the image. So when you need to use the width, use the horizontal pixel size of the image, and when you need to use the height use the vertical pixel size of the image.

The following filters are supported by ImageMagick by default:

  • geometry/scale: scales the image to the size specified, but maintaining the aspect ratio.
  • geometry/scalewidth: scales the image to the widthsize specified, but maintaining the aspect ratio.
  • geometry/scaleheight: scales the image to the heightsize specified, but maintaining the aspect ratio.
  • geometry/scaledownonly: scales the image to the size specified, but maintaining the aspect ratio. The image will not be scaled if the source size is smaller than the destination size.
  • geometry/scalewidthdownonly: scales the image to the widthsize specified, but maintaining the aspect ratio. The image will not be scaled if the source size is smaller than the destination size.
  • geometry/scaleheightdownonly: scales the image to the heightsize specified, but maintaining the aspect ratio. The image will not be scaled if the source size is smaller than the destination size.
  • geometry/scaleexact: scales the image to the exact size specified, but without maintaining the aspect ratio.
  • geometry/scalepercent: scales the image to the size specified, but without maintaining the aspect ratio.
  • geometry/crop: crops the image to the crop size specified and according to the crop location specified.
  • colorspace/gray
  • luminance/gray: changes the colors of the image based on the luminance.
  • luminance/sepia: changes the colors of the image based on the luminance
  • color/monochrome: changes the colors of the image based on the threshold value. The luminance is calculated and if it is in the specified threshold range it will use the specified color for that range.
  • border/color
  • border/width

The parameters to use here are:

  • (scale%) : the height and width will both be scaled by the specified percentage.
  • (scale-x%)x(scale-y%) : the width and height are individually scaled by specified percentages. (Only one % symbol needed.)
  • (width) : the width is given, and the height will automagically be selected to preserve aspect ratio.
  • x(height) : the height is given, and the width will automagically be selected to preserve aspect ratio.
  • (width)x(height) : the maximum values of the width and height are given, but the aspect ratio is preserved.
  • (width)x(height)^ : the minimum values of the width and height are given, but the aspect ratio is preserved.
  • (width)x(height)! : the width and height are emphatically given, and the original aspect ratio is ignored.
  • (width)x(height)> : this will change the dimensions the same as "widthxheight", but only if both the image dimension exceeds the specified dimension.
  • (width)x(height)< : this will change the dimensions the same as "widhtxheight", but only if both the image dimensions exceed the specified dimensions
  • (area)@ : will resize the image to have the specified area in pixels. Aspect ratio is preserved.

This setting is case sensitive.

Examples

Filters[]=geometry/scale=-geometry  %1x%2
 
Filters[]=geometry/scalewidth=-geometry  %1
 
Filters[]=geometry/scaleheight=-geometry x%1
 
Filters[]=geometry/crop=-crop  %1x%2+%3+%4
 
Filters[]=filter/noise=-noise  %1
 
Filters[]=filter/swirl=-swirl %1
 
Filters[]=flatten=-flatten
 
Filters[]=resize=-resize  %1

Ester Heylen (11/05/2010 10:44 am)

Ester Heylen (11/05/2010 10:44 am)


Comments

There are no comments.