Thanks for that. We will be moving over to MX in the very near future and this will prove very handy.

For the moment though I need a CF 5 solution.

Cheers

Dave



At 16:02 3/31/2003 +0100, you wrote:
> I need to calculate the dimensions of an image so that I can open a
new
> window of the correct size.

If you're using MX, use the awesome code that someone supplied other
day....

<cfscript>
imageObj = createObject("java", "java.awt.Toolkit");
imagetools = imageObj.getDefaultToolkit();
objImage = imagetools.getImage("C:\test.gif");
width = objImage.getWidth();
height = objImage.getHeight();
</cfscript>

<cfoutput>
width: #width#<br>
height: #height#
</cfoutput>


-- Aidan Whitehall <[EMAIL PROTECTED]> Macromedia ColdFusion Developer Fairbanks Environmental Ltd +44 (0)1695 51775

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]


--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]



Reply via email to