I have this bit of code that used to work in the past... but now I'm getting: 

An exception occurred while trying to read the image.

javax.imageio.IIOException: Can't get input stream from URL!

I verified that the image is still there and permissions are still the same. 
I'm able to display the image fine. We're on cf9.

<cfimage source="#getImage.imgName#" action="info" structName="FlrPlnInfo">



I'm just trying to get the width of the image. So I tried to use code below but 
just getting -1 for width and height. 

<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("#getImage.imgName#");
width = img.getWidth();
height = img.getHeight();
</cfscript>
<cfoutput>#width#<br />#height#</cfoutput>

Thanks!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353887
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to