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:
WebCat2b13MacPlugIn - syntax to convert date (1997)
WebCat2 - Getting to the browser's username/password data (1997)
catagories (1997)
problems with 2 tags (1997)
XML WebDNA (2006)
Resume Catalog ? (1997)
Fileinfo... (2000)
WebCatalog2 Feature Feedback (1996)
setitems, one more thing (1997)
One other big addition... (1997)
RE: Credit card processing - UK (1997)
Need help with Shipping/Price discounts (1998)
Cookies and webcat (1997)
Is it IE6 hating rediercts? (2004)
WebCat2: Items xx to xx shown, etc. (1997)
Summary search -- speed (1997)
[TaxableTotal] - not working with AOL and IE (1997)
[WebDNA] Should I be able to use [setmimeheader name=Content-Type ? (2018)
[taxRate] [TaxTotal] ? (1997)
Size limit for tmpl editor ? (1997)