Plugin Name
Farcry CFImage Effects
Author
Jeff Coughlin (http://jeffcoughlin.com)
Description
...
Description
This plugin (FarCry CFImage Effects) adds image effects to images when used within FarCry. It extends the FarCry CFImage plugin and has a minimum requirement for FarCry Core version 4.0.8
Download
Download from the FarCry-CFImageEffects project home
.
Output Example
These examples used the following settings:
- ftLCustomEffects=""
- ftLCustomEffects="roundCorners();"
- ftLCustomEffects="roundCorners();reflect();"
- ftLCustomEffects="roundCorners(backgroundColor='black');reflect(reflectionHeight=80,backgroundColor='black');"
Minimum Requirements
- ColdFusion 8.0
- FarCry Core v4.0.8
- If that link doesn't work, you can grab the milestone from SVN.
- Or you can get a zipped copy of the latest SVN core files from my website at the nightly builds download page.
- Requires the plugin FarCry CFImage v0.0.3
Installation
- Place the plugin folder (farcrycf8imageefftects) in the FarCry plugins folder
- Add farcrycf8imageeffects to your plugin list in the farcryinit tag of your project's Application.cfm
- Update the application scope (?updateapp=1)
Code Block | ||
---|---|---|
| ||
<farcry:farcryInit
name="imageSite"
dbType="mssql"
plugins="farcrycms,farcrycfimage,farcrycfimageeffects" />
|
Features
- BEVEL Adds bevel to an image. Example: bevel(bSetAntialiasing=true,bevelLineWidth=1,bevelColor='black');
- bSetAntialiasing (optional) (boolean) (default="true"). To enable/disable antialiasing (default="true")
- bevelLineWidth (optional) (integer) (default="1"). Size (in pixels) of to use for the line width of the beveled box.
- bevelColor (Optional) (string) (default="lightgray"). Color of bevel to use. See CF docs for list of options. More info: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_h-im_43.html
- REFLECT Adds a mirror reflection below the image.
- bSetAntialiasing (optional) (boolean) (default="true"). To enable/disable antialiasing (default="true")
- backgroundColor (Optional) (string) (default="white"). Color of bevel to use. See CF docs for list of options. More info: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_h-im_43.html
- opacity (optional) [integer) (default="65"). Set the opacity percentage (choose between 0 and 100)
- reflectionHeight (optional) (integer) (default="35"). Height (in pixels) the reflected image will be.
- GRADIENTMASK Places a gradient mask over an image (Also used by reflect()).
- bSetAntialiasing (optional) (boolean) (default="true"). To enable/disable antialiasing (default="true")
- backgroundColor (Optional) (string) (default="white"). Color of bevel to use. See CF docs for list of options. More info: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_h-im_43.html
- ROUNDCORNERS Adds rounded corners to an image.
- bSetAntialiasing (optional) (boolean) (default="true"). To enable/disable antialiasing (default="true")
- backgroundColor (Optional) (string) (default="white"). Color of bevel to use. See CF docs for list of options. More info: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_h-im_43.html.
- cornerSize (optional) (integer) (default="20"). Size (in pixels) you'd like the corners to be.
How To Use
- When editing your custom type object add ftLCustomEffects="" and place your methods and arguments using the following format "methodName(arg1='val1',arg2=myVar2);methodName2();"
- string values for the argument must be within single quotes.
- If you'd like the argument value to be evaluated, remove the single quotes.
- You can call your own custom effects object using the attribute ftCustomEffectsObjName. See documentation for the FarCry CFImage plugin (under the heading HOW DO I MAKE MY OWN IMAGE EFFECTS PLUGIN?)
- Example usage:
- ftLCustomEffects="roundCorners();reflect(opacity=40,backgroundColor='black');"
- See more detailed examples below
Known Bugs
- The Bevel() function sometimes indents by one extra pixel
- The bevelLineWidth setting in Bevel() doesn't work. I believe this is a bug in CF8
- I am working on a fix for bevel() where I am rewriting the function to draw the lines manually instead of using ImageDrawBeveledRect()
Special Thanks
- I was inspired to make the FarCry CFImage Effects plugin from Pete Freitag's Image Effects Component
- Thanks to Jon Hartmann for the base code to reflect() and gradientMask()
Sample Code
...
title | ./farcry/projects/projectName/packages/types/myImagePhotos.cfc |
---|
...
Download and Documentation
Download the plugin and documentation from the FarCry-CFImageEffects project home
Author
Jeff Coughlin (http://jeffcoughlin.com)