I had the same trouble and finally just broke down and purchased the Alagad Image Component. If you have to deal with any server side imaging stuff I definitely recommend this. Well worth the $75. It was one of the few that would work on my linux and windows servers.

Below is the logic I used to get the job done. Now that I look at the tag again I could have used a different function and had less steps.

You just get the vertical number and horizontal numbers compare them to see if it is vertical or horizontal and resize them accordingly.

So if
horiz > vertical  = horizontal(landscape)

then resize 400px wide

but if
vertical > horiz  = vertical(portrait)

then resize 400px tall (or whatever size makes sense for this type)

Read the image resizing documentation for more info:
http://www.alagad.com/downloads/Documentation/AIC/HTML/ AIC_Documentation.htm#_Image_Size_Methods

There is also another one that is a little buggier, scary, and hard to get installed:
http://www.benorama.com/coldfusion/components/imaging.htm

Hope that helps,
Dave



On Aug 19, 2005, at 10:12 AM, Jake McKee wrote:

Yeah, a crop would cut off a pic that's too tall.

The reality is that in most applications, the best way to do thumbnails is to create thumnails that are a consitent size... something like 75x75 no matter what the image dimensions are. This way it's easier to output the thumbnails in a friendly way, and the design looks better because of the consistency.

Now that said, that means most of the time you're having to remove parts of the image for the thumbnail. If you were doing the thumbs by hand, you'd actually select the most representative part of the image to use, rather than just reducing the entire thing and randomly cropping. But with dynamic apps, that's near impossible to do, since you don't have human judgement to rely on.

Jake

Ryan Everhart wrote:


Jake,
It does have a crop function along with a bufferedCrop, and a
cropresize. If I did a crop on the picture wouldn't that take part of
the picture away?

I noticed on the fifth picture on this site that the vertical picture
got turned in the a horizontal picture..

http://lajollahomes.com/photos.php?property_ID=9

Ryan



On 8/19/05, Jake McKee <[EMAIL PROTECTED]> wrote:


Really what you're needing is a crop function. You'd resize in one
direction, then crop in the other direction. I can't recall if tmt_cfc
has a crop function though.

Ryan Everhart wrote:



Hi Everyone,
I'm going try to explain this the best I can, but if I fail please ask
questions.

I'm working on a real estate site and using some CFC code to
automatically resize photos when the agents upload them in the admin area. One thing I did not count on was that the agents would upload vertical pictures (taller than they are wide). This is causing some
problems with my code.

Using the CFC code I am able to resize the photos by width of 400px,
which is good for the horizontal pictures, but it doesn't work well
for those vertical photos.  The pictures are still too tall to fit
into my site.

Has anyone used tmt_img.cfc to resize photos and know how to handle
this, or does anyone else have any suggestions?

tmt_img.CFC
http://www.cfmentor.com/code/index.cfm?action=zipped&id=50

Thanks,
Ryan






----------------------------------------------------------
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


Reply via email to