ImageObj because it's a Toolkit Object yep call it banana if you like ;-)
Alex -----Original Message----- From: Paul Johnston [mailto:[EMAIL PROTECTED] Sent: 21 March 2003 17:14 To: [EMAIL PROTECTED] Subject: RE: [ cf-dev ] Retriving image dimensions > Can I resize with that too??? You can specify a filename or a URL to retrieve an image. You can create a scaled version of the image with: > > <cfset imageObj = createObject("java", "java.awt.Toolkit") > > <cfset imagetools = imageObj.getDefaultToolkit() > > <cfset objImage = imagetools.getImage("pathtoyourimagegoeshere")> > > <cfset width = objImage.getWidth()> > > <cfset height = objImage.getHeight()> <cfset ImageObj2 = createObject("java", "java.awt.Image")> <cfset scaledImage = objImage.getScaledInstance(30, 30, imageObj2.SCALE_SMOOTH)> The third part of the method is a static variable in the Image class. There are different types for speed and smoothness of image resize. (code is untested, but it should work something like the above - see the link to the java classes and figure it out for yourself) Paul PS I wouldn't call it an ImageObj because it's a Toolkit Object. The ImageObj2 should really be called ImageObj. -- ** 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]
