Whatever message this page gives is out now! Go check it out!
imageMakeTranslucent ( img , percent__)Parameter | Description |
img | Required. The ColdFusion image on which this operation is performed. |
percentage | Required. The percent of translucence:
|
<cfset myImage=ImageNew("",200,110)>
<!--- Set the drawing color to green. --->
<cfset ImageSetDrawingColor(myImage,"green")>
<!--- Turn on antialiasing to improve image quality. --->
<cfset ImageSetAntialiasing(myImage,"on")>
<!--- Draw a filled green oval on the image. --->
<cfset ImageDrawOval(myImage,5,5,190,100,"yes")>
<!--- Display the image in a browser. --->
<cfoutput>PNG image<br></cfoutput>
<cfset ImageWrite(myImage,"#expandpath('.')#/png.png")>
<cfset myImage = ImageRead("#expandpath('.')#/png.png")>
<cfimage source="#myImage#" action="writeToBrowser" >
<cfset x =ImageMakeTranslucent(myImage,50)>
<cfimage source="#x#" action="writeToBrowser" >
<cfset x =ImageMakeTranslucent(myImage,75)>
<cfimage source="#x#" action="writeToBrowser" >
<cfset x =ImageMakeTranslucent(myImage,100)>
<cfimage source="#x#" action="writeToBrowser" >