CFX_StampImageJuly 18 2002v1.0© CS Internétique, Claude Schnéegans |
|---|
| DESCRIPTION |
|---|
The format of the images are determined by the file extensions: .jpg, .jpeg, .gif or .png.
A typical situation, like in the example provided, would be to stamp a photograph with some copyright notice as it is received on the server. This stamp image can be simply embossed over a transparent background. The result will be a semi-transparent stamp over the image.
The image could be stamped as well off line before it is sent to the server, but the advantage of using this tag is that both the original for archive purpose, and the stamped image for display on the site, could be saved on the server.
| NOTE |
|---|
| INSTALLATION |
|---|
You do this by going to the "CFX Tags" tab in the administrator,
For more information refer to the ColdFusion documentation "Managing CFXs".
Important Note:
This tag uses the following DLL which must be active on your system:
ADVAPI32.DLL COMCTL32.DLL COMDLG32.DLL GDI32.DLL KERNEL32.DLL SHELL32.DLL SHLWAPI.DLL STAMPIMAGE.DLL USER32.DLL WINSPOOL.DRV
All these file are standard in Windows 98 and NT.
If one of these files is missing, you will probabily get the following error message message:
Error loading CFX custom tag library The library associated with the custom tag CFX_STAMPIMAGE (c:\coldfusion\bin\cftags\StampImage.dll) was not found. Please check the LibraryPath entry for this tag in the custom tag database to verify that the library file exists and is accessible by the ColdFusion service.
| SYNTAX |
|---|
<CFX_StampImage IMAGEFILE = "" STAMPFILE = "" OUTFILE = "" MERGEFACTOR = "" X = "" Y = "" > Example
<CFX_StampImage
IMAGEFILE="#Expandpath('hockey.jpg')#"
STAMPFILE="#Expandpath('stamp.gif')#"
OUTFILE="C:\temp\stamped.jpg"
X="50"
Y="50">
|
| TAG | ATTRIBUTE | CONTENT | REQUIRED | DEFAULT |
|---|---|---|---|---|
| <CFX_StampImage | IMAGEFILE= | Full path of the input file image. | Yes | |
| STAMPFILE= | Full path of the input stamp file image. | Yes | ||
| OUTFILE= | Full path of the output file image. | Yes | ||
| MERGEFACTOR= | A percentage amount the stamp image will be merged into the input image. 100 means that the area in the input image is completely replaced by the stamp image (except for transparent pixels), while 0 means no action is taken. | No | 50 | |
| X= | X coordinate where to merge the stamp image into the input image. | Yes | ||
| Y= | Y coordinate where to merge the stamp image into the input image. | Yes |