找了很多方法,开始的时候自己试着使用cfml调用java,没有成功,后来发现有coldfusion开源的image组件,里面的功能很全很强大,其实cf8已经有了cfimage的标签了,可是我 还是使用的cf7。。。
coldfusion7 thumbnail
- 调用方法:<cfset resize150 = imageCFC.resize("", "/Images/image.jpg", "/Images/image_thumb", 150, 0)>
- 调用方法参考:http://www.opensourcecf.com/forums/messages.cfm?threadid=7192940B-EF86-07F9-FC46621DFB000EF3,另外imagecfc包里的doc里有相关例子
- 使用cfimage:<cfimage action="info" structname="imagetemp" source="#expandPath('Ferrari.jpg')#" /><cfset x=min(150/imagetemp.width, 113/imagetemp.height)/><cfset newwidth = x*imagetemp.width /><cfset newheight = x*imagetemp.height /><cfimage action="resize" source="#expandPath('Ferrari.jpg')#" width="#newwidth#" height="#newheight#" destination="#expandPath('FerrariThumb.jpg')#" overwrite="true" />
- http://topic.csdn.net/t/20060615/15/4823591.html
- http://livedocs.adobe.com/coldfusion/6/Developing_ColdFusion_MX_Applications_with_CFML/Java5.htm
- http://www.systemanage.com/cff/cf_java_cfobject_faq.cfm