On Wed, Oct 06, 2004 at 01:23:25PM +1000, Gavin Stewart wrote:

> Does anyone know how to get the pixel size(width and height) of an image
> when uploading. Ive tried looking for free cutom tags with no avail. Any
> help would be appreciated

http://www.geocities.com/marcoschmidt.geo/image-info.html

height, width, image type, progressive y/n (usefull if you're doing
flash related stuff)

Here's some code to wrap around the java class. Stick this into a 
function/cfc , with arguments etc:

<cfscript>
ReturnStruct = StructNew();
ImageChek   = createObject("java","ImageInfo")  ;
NameObj     = 
createObject("java","java.io.RandomAccessFile").init("#path##filename#","r") ;
ImageChek.setInput(NameObj)   ;
OKImage = ImageChek.check()   ;

if (OKImage eq "YES")
{  ReturnStruct.Format        = ImageChek.getformatName()   ;
ReturnStruct.Height        = ImageChek.getheight()       ;
ReturnStruct.Type          = ImageChek.getmimetype()     ;
ReturnStruct.Width         = ImageChek.getWidth()        ;
ReturnStruct.IsProgressive = ImageChek.IsProgressive()   ;
ReturnStruct.status        = "OK"                        ;
}
else
{ ReturnStruct.status        = "BAD"                       ; }

</cfscript>

Also:

http://www.benorama.com/coldfusion/components/imaging.htm


Cheers

Paul Haddon
Technical Services Manager
Formstar Print Technologies

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to