Read in the image
<cfimage name = "local.image" action="read" source="test.jpg"/>
Turn on anti-aliasing ("softens jagged edges")
<cfset ImageSetAntiAliasing(local.image)/>
Set the text color
<cfset ImageSetDrawingColor(local.image, "000000")/>
Set extra attributes
<cfset local.attrs = {
Font = 'Arial',
Size = 36,
Style = 'bold'
}/>
Draw over the image (image,text,x-position,y-position,attributes)
<cfset ImageDrawText(local.image, "Hello World!", 10, 10, local.attrs)/>
No comments:
Post a Comment