AW: Dynamic Image resizing for thumbnail view with correct Aspect...
AW: Dynamic Image resizing for thumbnail view with correct Aspect...
- Subject: AW: Dynamic Image resizing for thumbnail view with correct Aspect...
- From: Helge Staedtler <email@hidden>
- Date: Tue, 26 Jul 2005 22:50:26 +0200
You could also use some class that does *not* come from Apple and may also
work in the future without having this ugly feeling of using a private
method...
http://schmidt.devlib.org/image-info/
other stuff will be perhaps available at www.wocode.com
Regards,
Helge
Am 26.07.2005 20:15 Uhr schrieb "Nathan Walker" unter
<email@hidden>:
> 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
--
Helge Städtler
Franz-Liszt-Strasse 16
28209 Bremen
tel. 0421 626 5 929
mobil 0177 5453559
- Expect and Respect.
_______________________________________________
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