Re: Dynamic Image resizing for thumbnail view with correct Aspect...
Re: Dynamic Image resizing for thumbnail view with correct Aspect...
- Subject: Re: Dynamic Image resizing for thumbnail view with correct Aspect...
- From: Nathan Walker <email@hidden>
- Date: Tue, 26 Jul 2005 14:15:59 -0400
boy i feel like an idiot....okay thanks mike. that's all i needed to do.
thanks for that private framework tip...i've got a use for that in
another project.
On Jul 26, 2005, at 2:03 PM, Mike Schrag wrote:
If you mean you just want the browser to show them smaller (i.e.
users will still be sent the 700 px wide version, but it will look
smaller), then you can just specify width = "200" on your WOImage
and the browse will adjust the height proportionally. If you want
access to image sizes and don't mind private frameworks, you can
use com.webobjects.appserver._private.WOImageInfo:
URL urlToImage = ...
WOImageInfo wii = new WOImageInfo(urlToImage);
int width = wii.width();
int height = wii.height();
If you actually want to create thumbnails, there are a bunch of
ways, but none of them necessarily _simple_ -- JAI, ImageMagick
system call, JNI to various image libraries, etc.
ms
On Jul 26, 2005, at 1:51 PM, Nathan Walker wrote:
does anybody know the best route to go when displaying a thumbnail
page of full-size images (with pixel widths of 700) ?
I would just like to show the thumbnails with a width of 200
pixels but the heights all vary and I'd like them to display with
no distortion so as to keep the correct aspect ratio.
Is there a way to check the current height and width on an image
and do some calculations to get it to a width of 200 pixels and
dynamically adjust the height to maintain the correct aspect ratio ?
Thanks,
Nathan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mdimension.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden