Eron,

I resize on the X axis only and let the Y fall where it will -- I'm more concerned 
about the width than the height on my sites.  This retains the aspect ratio and 
retains image quality.  If you try to force the image into a ratio that differs from 
the original, you will have distortion.  There is no way to avoid this, as far as I 
know, without cropping the image.

If you are concerned about the size, you can check the size when they upload.  If the 
size exceeds your maximum after resizing one axis, delete it.  CFX_DynamicImage 
(http://dhinet.com/CFX_DynamicImage/)  allows you to get info on an image as well as 
resize.  Not free, but works well and is well documented.

Hope this was helpful.

Craig

> -----Original Message-----
> From: Eron Cohen [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, June 06, 2001 12:52 PM
> To:   CF-Talk
> Subject:      Image resizing question
> 
> Hi Folks,
> 
> I am looking for ideas on how to handle a problem: The
> site I am working on allows customers to upload their
> company logos for display on a public page.  I'd like
> the logos to be 100x100 pixels but I have a feeling I
> can't really "require" that because alot of the
> clients won't have a clue what I am talking about and
> I don't want to chase anyone away.
> 
> I tried using CFX_Image to resize the images after
> they come in, but they wind up a bit screwed up. 
> First problem is that CFX_image only lets you resize X
> or Y and then scales the other in proportion.  That
> means to get to 100x100 I would potentially have to
> scale one way and then scale the other which would
> result in a smaller image the other direction.  Second
> problem is alot of the images look bad after the
> resizing.
> 
> I guess I could also just set the image height and
> width when I display them, but I also don't like that
> solution.  I am mainly concerned that someone will
> upload a really tall or really wide image that will
> take over my whole page.
> 
> Does anyone have any comments or ideas about what to
> do here?
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to