Development

Changeset 13173

You must first sign up to be able to contribute.

Changeset 13173

Show
Ignore:
Timestamp:
11/20/08 05:15:18 (5 years ago)
Author:
gnat
Message:

convert to markdown

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/gsImageProcessorPlugin/trunk/README

    r13172 r13173  
    1 This plugin allows you to process incoming images. Resize, crop and add drop 
    2 shadows. It also includes a helper class that when passed the image input and  
    3 output, plus an array of parameters, will automatically perform all effects and  
    4 return a saved image object. 
     1General Options 
     2=============== 
    53 
    6 Copyright (C) 2007 Gnat Solutions, Inc Nathanael D. Noblet <nathanael@gnat.ca> 
     4If save: is set, the image will be saved after processing and before returning to the caller. The following options can be set 
    75 
    8 Taken from the original drop shadow, crop and resize classes written by  
    9 Andrew Collington 
     6Save 
     7---- 
    108 
    11 *Note* Not all of this information is accurate/useful since turned into a symfony  
    12 plugin, but is included for completeness. 
     9    save: 
     10      type:         string (optionally force the image 
     11      transparent:  [ R,G,B ] or 'FFAAFF' (sets the transparent color) 
    1312 
    14  Description 
     13Create 
     14------ 
     15    create: 
     16      depth:        8 | 32 (bit depth of created image, basically imagecreate vs imagecreatetruecolour) 
     17      width:        integer 
     18      height:       integer 
     19      bgcolor:      [ R,G,B ] or FFAAFF 
     20      transparent:  boolean                 ( not applied unless bgcolor is set )  
     21      opacity:      integer (default 127)   ( not applied unless bgcolor is set ) 
    1522 
    16  This class allows for easy creation of images with a drop shadow effect. 
    17  Images can be read from a file or passed as a string (as you might take 
    18  the images from a database), and they can also be resized for easy 
    19  creation of thumbnails.  You can also change the background colour of 
    20  the image and generate the correct colour through the shadow. 
     23Processors 
     24========== 
    2125 
    22  Requirements 
     26Border 
     27----- 
     28    border: 
     29      width:        integer  - default is 10 px 
     30      color:        [ R,G,B ] or FFAAFF 
     31      clone:        boolean 
    2332 
    24  PHP 4.1.0+, GD 2.0.1+ 
     33Colorize 
     34-------- 
     35    colorize: 
     36      color:        [ R,G,B ] or FFAAFF 
     37      clone:        boolean 
    2538 
    26  Shadow images 
     39Crop 
     40---- 
     41    crop: 
     42      width:        integer (required) 
     43      height:       integer (required) 
    2744 
    28  I found that the best way to create a drop shadow was to first create 
    29  the shadow in an art program, and then split it up into 8 seperate 
    30  pieces; top left corner, top line, top right corner, left side, right 
    31  side, bottom left corner, bottom line, and bottom right corner. 
     45Resize 
     46------ 
     47    resize:  
     48      crop:         boolean (optional) - crops the image to the final size after resizing to width   
     49      strict:       boolean (optional) - forces the width/heights to be *exact* to specified dimensions 
     50      width:        integer (required) 
     51      height:       integer (optional - required with strict) 
     52   
     53Rotation 
     54-------- 
     55    rotate: 
     56      degrees:      integer 
     57      background:   [ R,G,B ] or FFAAFF 
     58      clone:        boolean 
    3259 
    33  If you don't like the spacing of the drop shadow, then you could easily 
    34  create your own drop shadows and over-write the files supplied.  The 
    35  different sizes of the drop-shadow images should be automatically taken 
    36  into consideration.  If you create your own shadows then you must save 
    37  them as PNG-24 (24-bit), as that level of alpha channels is required. 
     60Drop Shadow 
     61----------- 
     62    shadow: 
     63      color:   [ R,G,B ] or 'FFAAFF' (default 000000) 
     64      path:   /full/path/to/dropshadow/images.png 
    3865 
    39  If no drop-shadow images can be located (or it cannot load up all of the 
    40  images) then it will still save the image (resized if you told it to be), 
    41  just without the drop-shadow effect. 
     66Text Overlay 
     67------------ 
     68Watermark 
     69--------- 
    4270 
     71Processing Order 
     72================ 
     73The effects and options are currently applied in the following order assuming all  
     74effects are requested. 
    4375 
    44  Andrew Collington, 2003 
    45  php@amnuts.com, http://php.amnuts.com/ 
     76*    Create 
     77*    Resize 
     78*    Crop 
     79*    Colorize 
     80*    Border 
     81*    Drop Shadow 
     82*    Rotate 
     83*    Watermark 
     84*    TextOverlay 
     85*    Save 
     86