Re: Automatic thumbnail images
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 19272
interpreted = N
texte = On the Mac side, you can use Clip2Gif combined with AppleScript to get theheight and width of GIFs and JPEGs. Wrap that in a little [math] magic andyou're good to go. (This solution is a little slow; if possible, useClip2Gif to get the image info once and store it in a .db for quick & easyrepeat access)You can also acheive the desired effect with pure HTML, by only specifyingone parameter (width or height, but not both). Most (if not all) browserswill intellegently scale the image in both dimensions.-DaveAt 9:05 PM 8/3/98, Pat McCormick wrote:>I want to automatically make a thumbnail for each of several images on a>server.>>Say I want the thumbnail max height to be 100 pix and width to be 80 pix.>Images can be of any original height and width.>>How can I reduce the image so that both height and width are below the>maximums and yet maintain the aspect ratio for the image (the ratio of>height to width)>>The trick would be to know either how to get at the height and width info>from the original file which could be GIF or JPEG, or have some other tool>that can report image information for use within HTML.>>Any Ideas?>>Pato--------------- Dave MacLeay --+o----------- Digital Frontier --+o--- dave@digitalfrontier.com --+
Associated Messages, from the most recent to the oldest:
On the Mac side, you can use Clip2Gif combined with AppleScript to get theheight and width of GIFs and JPEGs. Wrap that in a little
[math] magic andyou're good to go. (This solution is a little slow; if possible, useClip2Gif to get the image info once and store it in a .db for quick & easyrepeat access)You can also acheive the desired effect with pure HTML, by only specifyingone parameter (width or height, but not both). Most (if not all) browserswill intellegently scale the image in both dimensions.-DaveAt 9:05 PM 8/3/98, Pat McCormick wrote:>I want to automatically make a thumbnail for each of several images on a>server.>>Say I want the thumbnail max height to be 100 pix and width to be 80 pix.>Images can be of any original height and width.>>How can I reduce the image so that both height and width are below the>maximums and yet maintain the aspect ratio for the image (the ratio of>height to width)>>The trick would be to know either how to get at the height and width info>from the original file which could be GIF or JPEG, or have some other tool>that can report image information for use within HTML.>>Any Ideas?>>Pato--------------- Dave MacLeay --+o----------- Digital Frontier --+o--- dave@digitalfrontier.com --+
Dave MacLeay
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
WebCommerce: Folder organization ? (1997)
There's a bug in the math context ... (1997)
WebCat2: Formulas.db question (1997)
Problems getting parameters passed into email. (1997)
Spreadsheet App pref. [OT] (2001)
Part Html part WebDNA (1997)
How to download a database???/ (2000)
Using Applescript to process WebCatalog functions (1998)
Help name our technology! (1997)
I have observed and I am gone. (1998)
Secure server question (1997)
special commerce fields (1997)
[WebDNA] Which OS? (2009)
Web Logs (1998)
problems with WebCat-Plugin ()
Still having problems with Authen (1997)
WebCat2 several catalogs? (1997)
Showif date > other date (2004)
Mime-Version in email header (1997)
syntax question, not in online refernce (1997)