1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-08-16 21:14:09 +02:00

rewrote docs. tested. prepare to tag v0.6

This commit is contained in:
Mikael Roos
2014-12-06 14:33:23 +01:00
parent 9015e7ce9d
commit af1aa661b9
4 changed files with 41 additions and 37 deletions

View File

@@ -141,7 +141,7 @@ $shortcut = get(array('shortcut', 'sc'), null);
verbose("shortcut = $shortcut");
if (isset($shortcut)
if (isset($shortcut)
&& isset($config['shortcut'])
&& isset($config['shortcut'][$shortcut])) {
@@ -285,7 +285,7 @@ if (isset($config['background_color'])) {
/**
* bgColor - Default background color to use
*/
$bgColor = get(array('bgColor', 'bgc'), null);
$bgColor = get(array('bgColor', 'bg-color', 'bgc'), null);
verbose("bgColor = $bgColor");
@@ -444,7 +444,7 @@ verbose("blur = $blur");
/**
* rotateBefore - Rotate the image with an angle, before processing
*/
$rotateBefore = get(array('rotateBefore', 'rb'));
$rotateBefore = get(array('rotateBefore', 'rotate-before', 'rb'));
is_null($rotateBefore)
or ($rotateBefore >= -360 and $rotateBefore <= 360)
@@ -457,7 +457,7 @@ verbose("rotateBefore = $rotateBefore");
/**
* rotateAfter - Rotate the image with an angle, before processing
*/
$rotateAfter = get(array('rotateAfter', 'ra', 'rotate', 'r'));
$rotateAfter = get(array('rotateAfter', 'rotate-after', 'ra', 'rotate', 'r'));
is_null($rotateAfter)
or ($rotateAfter >= -360 and $rotateAfter <= 360)
@@ -470,7 +470,7 @@ verbose("rotateAfter = $rotateAfter");
/**
* autoRotate - Auto rotate based on EXIF information
*/
$autoRotate = getDefined(array('autoRotate', 'aro'), true, false);
$autoRotate = getDefined(array('autoRotate', 'auto-rotate', 'aro'), true, false);
verbose("autoRotate = $autoRotate");
@@ -507,7 +507,7 @@ verbose("json = $outputFormat");
/**
* dpr - change to get larger image to easier support larger dpr, such as retina.
*/
*/
$dpr = get(array('ppi', 'dpr', 'device-pixel-ratio'), 1);
verbose("dpr = $dpr");
@@ -522,7 +522,7 @@ $convolve = get('convolve', null);
// Check if the convolve is matching an existing constant
if ($convolve && isset($config['convolution_constant'])) {
$img->addConvolveExpressions($config['convolution_constant']);
verbose("convolve = " . print_r($config['convolution_constant'], 1));
verbose("convolve constant = " . print_r($config['convolution_constant'], 1));
}
verbose("convolve = " . print_r($convolve, 1));
@@ -569,6 +569,7 @@ $img->log("Incoming arguments: " . print_r(verbose(), 1))
// Pre-processing, before resizing is done
'scale' => $scale,
'rotateBefore' => $rotateBefore,
'autoRotate' => $autoRotate,
// General processing options
'bgColor' => $bgColor,
@@ -581,7 +582,6 @@ $img->log("Incoming arguments: " . print_r(verbose(), 1))
'blur' => $blur,
'convolve' => $convolve,
'rotateAfter' => $rotateAfter,
'autoRotate' => $autoRotate,
// Output format
'outputFormat' => $outputFormat,

View File

@@ -88,13 +88,8 @@ return array(
* offset.
*/
'convolution_constant' => array(
'edge' => '-1,-1,-1, -1,8,-1, -1,-1,-1, 9, 0',
'edge-alt' => '0,1,0, 1,-4,1, 0,1,0, 1, 0',
'draw' => '0,-1,0, -1,5,-1, 0,-1,0, 0, 0',
'sharpen-alt' => '0,-1,0, -1,5,-1, 0,-1,0, 1, 0',
'emboss-alt' => '-2,-1,0, -1,1,1, 0,1,2, 1, 0',
'mean' => '1,1,1, 1,1,1, 1,1,1, 9, 0',
'motion' => '1,0,0, 0,1,0, 0,0,1, 3, 0',
//'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',
),