Ken what custom tag are you using to change the w and h of your images? Cause the one I'm using only allows me to change the width I believe. That can be good or bad. Good that the images that gets uploaded will never be distorted unless it was distorted in the first place. Bad that the image uploaded may exceed the height criteria.
Ron -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ken Ferguson Sent: Friday, January 21, 2005 8:33 AM To: [email protected] Subject: RE: image manipulation I don't know what Kevin is trying to do exactly, but there could be many reasons -- "I'm sorry, you can't upload images greater than 200*200" or "Your image is 50*50 and may appear distorted when the site displays it at the 300*300 default setting" ... You can use this information for any number of purposes. I do something similar in a PHP app that I have so people don't upload logos that are bigger in dimension than I want to show. But I still allow them to upload images of custom width and height as long as they don't exceed my maximums... Also, I have images of products that could be 300*300. They could be 280*280, or they could be 300* 225. If I want to show those images at something like 90 pixels wide. I need to know the width and height so I can manipulate them without distorting the image if it isn't square. --Ferg -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Blackman Sent: Friday, January 21, 2005 8:11 AM To: [email protected] Subject: RE: image manipulation The curious question here is "Why would you want to find the height and width of a client side object?" Curious!? Dan -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adrian J. Moreno Sent: Thursday, January 20, 2005 11:30 PM To: [email protected] Subject: Re: image manipulation Found via Google: http://www.sitepoint.com/blog-post-view.php?id=168133 Quick and Dirty Way to get Image Dimensions by David Medlock However I can't see the need to invoke java.awt.Image as he has, so I removed the call. I also shoved everything into <cfscript>. -------------------- <code> -------------------- <cfscript> tk = CreateObject("java", "java.awt.Toolkit"); // "myImage" has to have the full physical path and file name. myImage = "C:\fi_logo.gif"; img = tk.getDefaultToolkit().getImage(myImage); width = img.getWidth(); height = img.getHeight(); </cfscript> <cfoutput> W: #variables.width# <br /> H: #variables.height# </cfoutput> -------------------- </code> -------------------- Edit: Daniel's post showed up just before I hit submit. Tested on my local Win2k desktop (CFMX on JBoss via cygwin), but this code should run anywhere java runs. Booyah! -- Adrian Kevin Fricke wrote: > Yes but I am trying to find out if there is a way for Coldfusion to > determine the size of the image....WxH? > > Any ideas? > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 20, 2005 1:15 PM > To: [EMAIL PROTECTED] > Subject: Re: image manipulation > > > Doesn't photoshop give you this info when you check on Image size? > ---------------------------------------------------------- To post, send email to [email protected] To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm ---------------------------------------------------------- To post, send email to [email protected] To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm ---------------------------------------------------------- To post, send email to [email protected] To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm ---------------------------------------------------------- To post, send email to [email protected] To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm
