readss an image from a file or URL.
A java BufferedImage object, suitable for passing into other imageCFC methods.
readImage(source,forModification)
| Parameter | Required? | Default | Description |
|---|---|---|---|
| source | YES | - | A file path or URL to a supported image file. |
| forModification | NO | True | Will cause this method to return an error if the image cannot be manipulated. |
<cfset imageCFC = createObject("component","image")>
<cfset img1 = imageCFC.readImage("C:\Inetpub\wwwroot\myimage.jpg")>
<cfset img2 = imageCFC.readImage("http://localhost/myimage.jpg")>
<cfdump var="#img1#">
<cfdump var="#img2#">