Changeset 13173
- Timestamp:
- 11/20/08 05:15:18 (5 years ago)
- Files:
-
- plugins/gsImageProcessorPlugin/trunk/README (modified) (1 diff)
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. 1 General Options 2 =============== 5 3 6 Copyright (C) 2007 Gnat Solutions, Inc Nathanael D. Noblet <nathanael@gnat.ca> 4 If save: is set, the image will be saved after processing and before returning to the caller. The following options can be set 7 5 8 Taken from the original drop shadow, crop and resize classes written by 9 Andrew Collington 6 Save 7 ---- 10 8 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) 13 12 14 Description 13 Create 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 ) 15 22 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. 23 Processors 24 ========== 21 25 22 Requirements 26 Border 27 ----- 28 border: 29 width: integer - default is 10 px 30 color: [ R,G,B ] or FFAAFF 31 clone: boolean 23 32 24 PHP 4.1.0+, GD 2.0.1+ 33 Colorize 34 -------- 35 colorize: 36 color: [ R,G,B ] or FFAAFF 37 clone: boolean 25 38 26 Shadow images 39 Crop 40 ---- 41 crop: 42 width: integer (required) 43 height: integer (required) 27 44 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. 45 Resize 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 53 Rotation 54 -------- 55 rotate: 56 degrees: integer 57 background: [ R,G,B ] or FFAAFF 58 clone: boolean 32 59 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 taken36 into consideration. If you create your own shadows then you must save37 them as PNG-24 (24-bit), as that level of alpha channels is required.60 Drop Shadow 61 ----------- 62 shadow: 63 color: [ R,G,B ] or 'FFAAFF' (default 000000) 64 path: /full/path/to/dropshadow/images.png 38 65 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. 66 Text Overlay 67 ------------ 68 Watermark 69 --------- 42 70 71 Processing Order 72 ================ 73 The effects and options are currently applied in the following order assuming all 74 effects are requested. 43 75 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