mirror of
https://github.com/mosbth/cimage.git
synced 2025-08-30 10:59:51 +02:00
Introduced default values for almost all confguration options #72
This commit is contained in:
@@ -27,15 +27,21 @@ return array(
|
||||
* Check that the imagefile is a file below 'image_path' using realpath().
|
||||
* Security constraint to avoid reaching images outside image_path.
|
||||
* This means that symbolic links to images outside the image_path will fail.
|
||||
*
|
||||
* Default value:
|
||||
* image_path_constraint: true
|
||||
*/
|
||||
'image_path_constraint' => true,
|
||||
//'image_path_constraint' => false,
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* A regexp for validating characters in the image filename.
|
||||
*
|
||||
* Default value:
|
||||
* valid_filename: '#^[a-z0-9A-Z-/_\.:]+$#'
|
||||
*/
|
||||
'valid_filename' => '#^[a-z0-9A-Z-/_\.:]+$#',
|
||||
//'valid_filename' => '#^[a-z0-9A-Z-/_\.:]+$#',
|
||||
|
||||
|
||||
|
||||
@@ -50,17 +56,19 @@ return array(
|
||||
* remote_password: false // as in do not use password
|
||||
* remote_pattern: null // use default values from CImage
|
||||
*/
|
||||
//'remote_allow' => true,
|
||||
'remote_allow' => true,
|
||||
//'remote_password' => false, // "secret-password",
|
||||
//'remote_pattern' => '#^https?://#',
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Set default timezone, it defaults to UTC if not specified.
|
||||
* Set default timezone.
|
||||
*
|
||||
* Default values.
|
||||
* default_timezone: ini_get('default_timezone') or 'UTC'
|
||||
*/
|
||||
//'default_timezone' => 'UTC',
|
||||
//'default_timezone' => 'UTC',
|
||||
|
||||
|
||||
|
||||
@@ -69,9 +77,12 @@ return array(
|
||||
* This is basically a security constraint to avoid using resources on creating
|
||||
* large (unwanted) images.
|
||||
*
|
||||
* Default values.
|
||||
* max_width: 2000
|
||||
* max_height: 2000
|
||||
*/
|
||||
'max_width' => 2000,
|
||||
'max_height' => 2000,
|
||||
//'max_width' => 2000,
|
||||
//'max_height' => 2000,
|
||||
|
||||
|
||||
|
||||
@@ -83,6 +94,8 @@ return array(
|
||||
* the alpha value is between 00 (opaqe) and 7F (transparent),
|
||||
* that is between 00000000-FFFFFF7F.
|
||||
*
|
||||
* Default values.
|
||||
* background_color: As specified by CImage
|
||||
*/
|
||||
//'background_color' => "FFFFFF",
|
||||
//'background_color' => "FFFFFF7F",
|
||||
@@ -92,7 +105,19 @@ return array(
|
||||
/**
|
||||
* Post processing of images using external tools, set to true or false
|
||||
* and set command to be executed.
|
||||
*
|
||||
* Default values.
|
||||
*
|
||||
* png_filter: false
|
||||
* png_filter_cmd: '/usr/local/bin/optipng -q'
|
||||
*
|
||||
* png_deflate: false
|
||||
* png_deflate_cmd: '/usr/local/bin/pngout -q'
|
||||
*
|
||||
* jpeg_optimize: false
|
||||
* jpeg_optimize_cmd: '/usr/local/bin/jpegtran -copy none -optimize'
|
||||
*/
|
||||
/*
|
||||
'postprocessing' => array(
|
||||
'png_filter' => false,
|
||||
'png_filter_cmd' => '/usr/local/bin/optipng -q',
|
||||
@@ -103,22 +128,29 @@ return array(
|
||||
'jpeg_optimize' => false,
|
||||
'jpeg_optimize_cmd' => '/usr/local/bin/jpegtran -copy none -optimize',
|
||||
),
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Create custom convolution expressions, matrix 3x3, divisor and
|
||||
* offset.
|
||||
*
|
||||
* Default values.
|
||||
* convolution_constant: array()
|
||||
*/
|
||||
/*
|
||||
'convolution_constant' => array(
|
||||
//'sharpen' => '-1,-1,-1, -1,16,-1, -1,-1,-1, 8, 0',
|
||||
//'sharpen-alt' => '0,-1,0, -1,5,-1, 0,-1,0, 1, 0',
|
||||
),
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Create custom shortcuts for more advanced expressions.
|
||||
*
|
||||
* Default values.
|
||||
* shortcut: array()
|
||||
*/
|
||||
'shortcut' => array(
|
||||
'sepia' => "&f=grayscale&f0=brightness,-10&f1=contrast,-20&f2=colorize,120,60,0,0&sharpen",
|
||||
@@ -137,6 +169,9 @@ return array(
|
||||
* &width=w1 // results in width=613
|
||||
* &width=c2 // results in spanning two columns with a gutter, 30*2+10=70
|
||||
* &width=c24 // results in spanning whole grid 24*30+((24-1)*10)=950
|
||||
*
|
||||
* Default values.
|
||||
* size_constant: array()
|
||||
*/
|
||||
'size_constant' => function () {
|
||||
|
||||
@@ -163,6 +198,8 @@ return array(
|
||||
/**
|
||||
* Predefined aspect ratios.
|
||||
*
|
||||
* Default values.
|
||||
* aspect_ratio_constant: array()
|
||||
*/
|
||||
'aspect_ratio_constant' => function () {
|
||||
return array(
|
||||
|
Reference in New Issue
Block a user