Well, I've tested a bunch now and it appears the code below is creating a
server variable for each file it reads. After the first read the values are
not recreated until the server is reboot. If I change the file is shows the
old size.
How can I clear just these variables or set some sort of timeout?
<cfobject type="JAVA" action="Create" name="tk"
class="java.awt.Toolkit"></cfobject>
<cfobject type="JAVA" action="Create" name="img"
class="java.awt.Image"></cfobject>
<cfscript>
img =
tk.getDefaultToolkit().getImage("#rootpath#\assets\banners\#gif_files.name#"
);
width = img.getWidth();
height = img.getHeight();
img.flush();
</cfscript>
Robert B. Harrison
Director of Interactive services
Austin & Williams
125 Kennedy Drive, Suite 100 Hauppauge NY 11788
T : 631.231.6600 Ext. 119
F : 631.434.7022
www.austin-williams.com
Great advertising can't be either/or... It must be &.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287810
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4