image

image

image

Field component to liase with all Image types

Examples

This example is taken from dmImage.cfc in farcry core. It has a source Image example, standard image example and thumbnail image example
<cfproperty ftSeq="22" ftFieldset="Image Files" name="SourceImage" type="string" hint="The URL location of the uploaded image" required="No" default="" 
    ftType="Image" 
    ftCreateFromSourceOption="false" 
    ftAllowResize="false"
    ftDestination="/images/dmImage/SourceImage" 
    ftlabel="Source Image" 
    ftImageWidth="" 
    ftImageHeight=""
    ftbUploadOnly="true"
    ftHint="Upload your high quality source image here."  />

<cfproperty ftSeq="24" ftFieldset="Image Files" name="StandardImage" type="string" 
    hint="The URL location of the optimised uploaded image that should be used for general display" required="no" default="" 
    ftType="Image" 
    ftDestination="/images/dmImage/StandardImage" 
    ftImageWidth="400" 
    ftImageHeight="1000" 
    ftAutoGenerateType="FitInside" 
    ftSourceField="SourceImage" 
    ftCreateFromSourceDefault="true" 
    ftAllowUpload="true" 
    ftQuality=".75"
    ftlabel="Mid Size Image"
    ftHint="This image is generally used throughout your project as the main image. Most often you would have this created 
        automatically from the high quality source image you upload." />  

<cfproperty ftSeq="26" ftFieldset="Image Files" name="ThumbnailImage" type="string" 
    hint="The URL location of the thumnail of the uploaded image that should be used in " required="no" default="" 
    ftType="Image"  
    ftDestination="/images/dmImage/ThumbnailImage" 
    ftImageWidth="80" 
    ftImageHeight="80" 
    ftAutoGenerateType="center"
    ftSourceField="SourceImage" 
    ftCreateFromSourceDefault="true" 
    ftAllowUpload="true" 
    ftQuality=".75"
    ftlabel="Thumbnail Image"
    ftHint="This image is generally used throughout your project as the thumbnail teaser image. Most often you would have 
        this created automatically from the high quality source image you upload." />
Image with no resize otions
<cfproperty name="featureImage" type="string" hint="Feature image for Lysaght site (landscape)." required="no" default="" 
    ftwizardStep="Body" 
    ftseq="34" ftfieldset="Feature Image" 
    ftAllowResize="false"
    ftType="image" 
    ftDestination="/images/lysaght/bslCaseStudy/featureImage" 
    ftlabel="Feature Image" />

Formtool Metadata

Attributes

Name Default Options Required Hint
ftAjaxMethod No The function that will be used to render the html output for ajax requests of a property
ftAllowedExtensions jpg,jpeg,png,gif No The extensions allowed to be uploaded.
ftAllowResize true No Will not allow any resize options if switched off
ftAllowResizeQuality false No Will not allow any quality change options if switched off
ftAllowUpload true No If there is more than one image, e.g thumbnail, use this to allow uploading a different thumbnail or turn this off to only autogenerate thumbnail from source image
ftAutoGenerateType FitInside No Auto generate options include: none, center, fitinside, forcesize, pad, topcenter, topleft, topright, left, right, bottomleft, bottomcenter, bottomright.
ftbSetAntialiasing true No support property
ftbUploadOnly false No Only upload the image and do not optimize or process it. Very useful for source images. Otherwise FarCry will optimize the source image, then read from that dequalitized image to make other optimized images. Can be used for any image field (not just source images).
ftClass No CSS Class that can be used on the formtool input
ftConvertImageToFormat No support property
ftCreateFromSourceDefault true No ???
ftCreateFromSourceOption true No ???
ftCropPosition center No Used when ftAutoGenerateType = aspectCrop
ftcustomEffectsObjName imageeffects No support property
ftDestination /images No ???
ftDisplayMethod No The function that will be used to render the html output for displaying a property
ftEditMethod No The function that will be used to render the html output for editing a property
ftFieldset No Used if you are relying on the framework to render your form. Used to group the fields into HTML fieldsets.
ftImageHeight No Use to resize an image from a source image
ftImageWidth No Use to resize an image from a source image
ftInterpolation blackman No support property
ftLabel No Used by the FarCry form layout as the label of the form field. This will default to the [name].
ftLabelAlignment inline inline, block No Used by FarCry Form Layouts for positioning of labels. inline or block.
ftlCustomEffects No support property
ftPadColor #ffffff No If ftAutoGenerateType = pad, this will be the colour of the pad
ftQuality 0.8 No support property
ftSeq No Used if you are relying on the framework to render your form. Used to sort the fields on the form.
ftShowConversionInfo true No Set to false to hide the conversion information that will be applied to the uploaded image.
ftSizeLimit 0 No File size limit for upload. 0 is no-limit
ftstyle No ???
ftThumbnailBevel false No ???
ftType No Tells the framework which of the formtool ui components to use when rendering your form. This will default to the [type].
ftValidateMethod No The function that will be used to render the html output for validating (processing) a property form submission
ftValidation No List of CSS classes that can be used for js validation
ftWatermark No The path relative to the webroot of an image to use as a watermark.
ftWatermarkTransparency 90 No The transparency to apply to the watermark.
ftWizardStep No Used if you are relying on the framework to render your form. Used to setup a wizard which is a multi step form process.