Thanks for getting rid of my headache Bryan!

-Paul

-----Original Message-----
From: Bryan Stevenson [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 31, 2005 4:51 PM
To: CF-Talk
Subject: Re: Get jpg pixel dimensions?


Ask and ye shall receive ;-)  Hope it does the trick!

  <!---(Function:
ImageSize)------------------------------------------------------
  Date Created:   November 28, 2003
  Author:         Bryan
  Arguments:      FileLoc - full path of image to get details for (string)
required
  Purpose:        returns file width/height
  Returns:        ImageInfo structure with ImgWidth/ImgHeight keys
  --->
  <cffunction name="ImageSize" returnType="struct" access="public">

    <cfargument name="FileLoc" type="string" required="Yes">

    <cfset jFileIn =
createObject("java","java.io.File").init(ARGUMENTS.FileLoc)>

    <cfset ImageInfo = StructNew()>
    <cfset ImageObject =
createObject("java","javax.imageio.ImageIO").read(jFileIn)>

    <cfset ImageInfo.ImgWidth = ImageObject.getWidth()>
    <cfset ImageInfo.ImgHeight = ImageObject.getHeight()>

    <cfreturn ImageInfo>

  </cffunction>

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201079
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to