我需要在Coldfusion中旋转一个图像,然后一旦旋转,它就会以新的旋转方式更新文件。到目前为止,这是我所拥有的。
<cfimage source="../imgupload/image1.jpg" name="myImage">
<cfset ImageRotate(myImage,90,"bicubic")>
<cfimage source="#myImage#" destination="image1.jpg" action="write" overwrite="yes">
<img src="../imgupload/image1.jpg" width="600">
然而,当文件显示在第4行时,它显示的是原始的 "非旋转 "图像。任何帮助将被感激。
尊敬的Sam
在第3行或第4行更改文件路径。
因为你是在看源文件夹中的一个图像
<cfimage source="../imgupload/image1.jpg" name="myImage">
<cfset ImageRotate(myImage,90,"bicubic")>
<cfimage source="#myImage#" destination="../imgupload/image1.jpg" action="write" overwrite="yes">
<img src="../imgupload/image1.jpg" width="600">
或
<cfimage source="../imgupload/image1.jpg" name="myImage">
<cfset ImageRotate(myImage,90,"bicubic")>
<cfimage source="#myImage#" destination="image1.jpg" action="write" overwrite="yes">
<img src="image1.jpg" width="600">