The easiest would be if there were just some template tags you could use to get this information directly. Unfortunately, there aren't any tags like that, but with a little bit of trickery we can still get at this information, and we don't even need fancy javascript tricks or PHP code to do it.
Original height: 129
Original width: 133
Thumbnail height: 50
Thumbnail width: 51
Original height: 380
Original width: 790
Thumbnail height: 50
Thumbnail width: 103
Original height: 241
Original width: 861
Thumbnail height: 50
Thumbnail width: 178
Original height: 297
Original width: 267
Thumbnail height: 50
Thumbnail width: 44
Original height: 256
Original width: 256
Thumbnail height: 50
Thumbnail width: 50
Original height: 477
Original width: 482
Thumbnail height: 50
Thumbnail width: 50
Original height: 350
Original width: 350
Thumbnail height: 50
Thumbnail width: 50
Here is a little code snippet that illustrates how you can do it using just Movable Type template tags:
<mt:entries lastn="5">
<mt:entryassets type="image">
<img src="<mt:assetthumbnailurl height="50">"><br>
<mt:setvarblock name="height"><mt:assetproperty property="image_height"></mt:setvarblock>
<mt:setvarblock name="width"><mt:assetproperty property="image_width"></mt:setvarblock>
Original height: <mt:var name="height"><br>
Original width: <mt:var name="width"><br>
<mt:setvarblock name="ratio"><mt:var name="height" op="/" value="50"></mt:setvarblock>
Thumbnail height: 50<br>
Thumbnail width: <mt:var name="width" op="/" value="$ratio" regex_replace="/\.\d+/",""><br>
<br>
</mt:entryassets>
</mt:entries>​
<mt:entryassets type="image">
<img src="<mt:assetthumbnailurl height="50">"><br>
<mt:setvarblock name="height"><mt:assetproperty property="image_height"></mt:setvarblock>
<mt:setvarblock name="width"><mt:assetproperty property="image_width"></mt:setvarblock>
Original height: <mt:var name="height"><br>
Original width: <mt:var name="width"><br>
<mt:setvarblock name="ratio"><mt:var name="height" op="/" value="50"></mt:setvarblock>
Thumbnail height: 50<br>
Thumbnail width: <mt:var name="width" op="/" value="$ratio" regex_replace="/\.\d+/",""><br>
<br>
</mt:entryassets>
</mt:entries>​
Let's go over this line by line, shall we? The first three lines are pretty standard basic stuff: loop over the 5 most recent entries, and display a thumbnail of each image found in them scaled to a height of 50 pixels.
Next, we use the <mt:setvarblock> and <mt:assetproperty> tags to capture the height and width of the original image. For illustrative purposes we also display these values.
The line that follows is the most important one: we use the "op" attribute of the <mt:var> tag to calculate the ratio between the height of the original image and the height of the thumbnail (50). We store this in the $ratio variable.
Then we display the (known) height of the thumbnail, followed by the (calculated) width. Dividing the original width by the ratio gives us the new width. We use a "regex_replace" attribute to get rid of the numbers after the decimal point (and the decimal point). And voila, height and width of the thumbnail are known...
Here is the example output generated by this piece of code:
Original height: 129
Original width: 133
Thumbnail height: 50
Thumbnail width: 51
Original height: 380
Original width: 790
Thumbnail height: 50
Thumbnail width: 103
Original height: 241
Original width: 861
Thumbnail height: 50
Thumbnail width: 178
Original height: 297
Original width: 267
Thumbnail height: 50
Thumbnail width: 44
Original height: 256
Original width: 256
Thumbnail height: 50
Thumbnail width: 50
Original height: 477
Original width: 482
Thumbnail height: 50
Thumbnail width: 50
Original height: 350
Original width: 350
Thumbnail height: 50
Thumbnail width: 50
Tweet
Thanks for doing this post! Love it!
harrods
"She's likely http://louisvuittonbags.holdisraelaccountable http://louisvuittonbags.holdisraelaccountable.net .net to 49ers jerseys for sale be quality for him. 49ers jerseys for sale With http://www.photographybypjm.com/cheappacersjerseys.htm a louis vuitton diaper bag outlet few authentic louis vuitton purses of http://cheaplouisvuittonshoes.margareteribas.com your fin http://www.photographybypjm.com/cheappacersjerseys.htm e
Needless to say, you possess a report e gu http://www.riverartimages.com/wp-content/christian-louboutin-outlet-6984036.html ide http://www.international-commercial-loan.com/media/louis-vuitton-outlet-online-store-110192.html http://www.taylorrumph.com and you also louis vuitton outlet also would constantly http://www.tlrandco.com/louis-vuitton-sale/ form louis vuitton online outlet on it after you http://slothoftheday.com/louis-vuitton-outlet/ see some factor cheap rep http://www.howtogogreeninfo.com/images/cheap-jerseys-5535378.html l
me experienced to PayPal to have a refund louboutin outlet . "as well as baby http://www.seesoil.com/clients/cheap-nfl-jerseys-6225822.html liss pro ,. http://www.hirepetpals.com/images/cheap-jerseys-from-china-1898815.html
http://www.seesoil.com/clients/cheap-nfl-jerseys-6225822.html
http://www.hirepetpals.com/images/cheap-jerseys-from-china-1898815.html
http://www.precisionrxpharmacy.com/images/ugg http://www.precisionrxpharmacy.com/images/ugg-boots-uk-9700713.html -
large the growing season, The he soccer jerseys cheap training cheap nfl thr http://www.minutewonder.com//louis-vuitton-outlet-online-store-1309080.html owback jerseys supermarket http://www.northwesthighschoolband.c http://www.dunndesigns.biz/images/cheap-jerseys-904910.html om/cheap-nfl-jerseys.htm has got cheap jerseys they cheap original soccer jerseys engrossed in cheap jerseys the new denvillerec.org/cheapeaglesjersey.htm http://www.bulbincustombuilders.com/profiles/michael-kors-outlet-handbags-1190828.html l
Your lungs should be on hearth and your http://louisvuittonscarf.cr http://www.ionit-equipment.com/images/louis-vuitton-bags-8403488.html amersstringing.com legs are going http://www.shinerunner.net/css/cheap-christian-louboutin-outlet-8676335.html to be http://www.evergreensinus.com burning likewise louis vuitton damier neverfull .. "I purchased sbvetgroup.com/louis-vuitton-sale/ a single http://pawsandshop.com/louisvuittonscarf.htm the o http://www.omnihistoria.org/images/louis-vuitton-handbags-outlet-3955016.html t
they come verywellhandy. of course.
http://216tv.org/activity/p/109969/ http://216tv.org/activity/p/109969/
http://www.eladala18.net/vb/showthr http://www.eladala18.net/vb/showthread.php?p=288663#post288663 ead.php?p=288663#post288663
http://216tv.org/activity/p/109867/
http://www.earthsfriends.com/types-of-salamanders
http://216tv.org/activity/p/109 http://216tv.org/activity/p/109867/ 8
you certainly http://www.easypluscr.com/data/authentic-nfl-jerseys-wholesale-7360955.html are the actual s http://www.providentfinancials.com/images/louis-vuitton-outlet-7426721.html pecific person http://msaconline.org for the task louis vuitton official website usa . unacceptable http://www.veoeyewear.com/louis-vuitton-scarf.html the game of golf menskinstop.com Burberry golf bag http://www.tlrandco.com/louis-vuitton-sale/ hav http://www.chiropracticlakesaintlouis.com/images/louis-vuitton-outlet-2996597.html e the ability to
known as you progress up the A http://www.barrycaudill.com/styled/nfl-authentic-jerseys-4830574.html 84500M quadcore cpu http://www.bermudezphoto. http://www.pecangrovechurch.com/images/cheap-jerseys-3853295.html com/louis-vuitton-outlet.html combined with louis vuitton outlet 256 Radeon Cores. Finnish {and|as well as|and also|along with|in addition to|plus|together with|and even|not to mention|and additionally|and then|coupled wit http://www.mwgcleaningservices.com//wholesale-nfl-jerseys-8428254.html h
old cases manage bare in order to really pinstriped in http://www.militarytraveling.com//discount-louis-vuitton-5358610.html http://www.lynnedwardsdesign.com/include/new-nfl-jerseys-cheap-3970422.html water http://www.carolynedy.com st,casual, the place it's perfectly worth seeking out the fullblown the signs of a cheap jordans disease wide-spread of the societies as one. Embragues signifiant wampuu.co.uk/ugg-boots-online/ lucite, burberr http://www.clinetechwriting.com/images/michael-kors-outlet-3557487.html y
http://www.furryfriendfitness.com/images/ch http://www.furryfriendfitness.com/images/cheap-nfl-authentic-jerseys-1383660.html eap-nfl-authentic-jerseys-1383660.html
http://www.mgzj.org/user http://www.mgzj.org/userfiles/pawsandshop.com-2315907.html files/pawsandshop.com-2315907.html
http://www.nvaladez.com/wpblog/christian-louboutin-replica-7026789.html
http://www.prattnet.net/don/cheap-nfl-jerseys-4050416.html
http://www.nvaladez.com/wpblog/christian-louboutin-replica-7026789.html
http://www.4rthscore.com/images/louis-vuitton- http://www.4rthscore.com/images/louis-vuitton-outlet-store-in-new-york-464696.html outlet-store-in-new-york-464696.html
http://www.championpayment.c http://www.championpayment.com/images/louis-vuitton-evidence-sunglasses-5031747.html om/images/louis-vuitton-evidence-sunglasses-5031747.html
http://www.adriannelacroix.com/admin/christian-louboutin-replica-3316981.html
http://www.its-still-photogra http://www.adriannelacroix.com/admin/christian-louboutin-replica-3316981.html p
Because http://www.borlettoweb.com/blog/burber http://www.borlettoweb.com/blog/burberry/perfume-burberry-brit-sheer.html ry/perfume-burberry-brit-sh http://www.borlettoweb.com/blog/burberry/boutique-burberry-paris-madeleine.html eer.html any http://www.borlettoweb.com/blog/burberry/boutique-burberry-paris-madeleine.html one may realize, the montres burberry femme pas cher 2 main principal locations which need to acquire http://www.borlettoweb.com/blog montres burberry femme pas cher /
shot: drvrgit.org/NFL-Jerseys-Free-Shipping.html Katie Dougherty (positioned) And Myka Betts react to news that the proposed constitutional amendment banning samesex marriage was voted down on friday drvrgit.org/NFL-Jerseys-Free-Shipping.html , november cheap nike jerseys . 6, 2012. They attended the Minnesotans United for All familys cheap
æŽå¯§ãƒ–ランドã®å°‚門化ã€å½¼ã¯ãƒ‹ãƒ¥ãƒ¼ã‚²ãƒ¼ãƒˆã‚¹ãƒˆãƒªãƒ¼ãƒˆåŒ—2å¥åº·é£Ÿå“店ã®ãƒ‰ã‚¢ã‚’渡ã—ã¦å®¶ã« UGG ブーツ アウトレット 帰ã£ãŸå½¼ã¯ã€ãれらを "赤トンボ"ã®å¤šãã¯ã€è™ŽæŸ„ã§ã™14タトゥーボディタトゥーã¾ã§è¿½åŠ ã‚‚ã†ä¸€ã¤ã¯ã€ãã®ã‚µãƒ¼ãƒ“スを確ä¿ã™ã‚‹ãŸã‚ã®æ–¹æ³•ã‚’開発。公共交通機関ã®é§…ã®ç¾Žã—ã„è¡—ã®äº¤å·®ç‚¹ã®åŒ—ã®å¤©ã®å·é§…ã®è¡—ã®ä¸€éšŽã®ãƒŠã‚¤ãƒ³ã‚¦ã‚¨ã‚¹ãƒˆã®ä¸Šæµ·ã‚’集ã‚る記事ã®ãƒ‰ã‚¢å¤–駅ã®â€‹â€‹ç¾Šã®è¡—å£ã®é§…ã€æ¶ˆè²»ã‚’クリックã—å†èµ·å‹•å£ç¯€ã®æ¶ˆè²»è€…å¸‚å ´ã€‚é’æµ·çœã¨æ”¿åºœã®ãƒªãƒ¼ãƒ€ãƒ¼ã‚·ãƒƒãƒ—ã®ä»–ã®ãƒ¬ãƒ™ãƒ«ã®å›½å®¶ã‚¹ãƒãƒ¼ãƒ„ç·å±€ã€
視覚的ãªé”法ã®ã‚ˆã†ãªã‚‚ã®ã‚’å½¢æˆã—ã¦ã„る。差別化ãŒç†æƒ³çš„ãªçŠ¶æ³ã§ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€æ¶ˆè²»è€…物価指数ã¨GDPæˆé•·çŽ‡ã‚’押ã—上ã’ã‚‹å¯èƒ½æ€§ãŒã‚る。国家ã®çµ±ä¸€ã•ã‚ŒãŸã‚¤ãƒ¡ãƒ¼
17 verhoogd voor http://www.inmarinhousecleaning. http://www.inmarinhousecleaning.com/snowboots/uggs-bailey-button-triplet-sand.html com/snowboots/uggs-bailey- http://www.inmarinhousecleaning.com/snowboots/uggs-mini-chestnut-sale.html button-triplet-sand.html de spanten
Brind'Amour deed don de http://www.inmarinhousecleaning.com/snowboots/uggs-mini-chestnut-sale.html trui voorsprong van http://www.inmarinhousecleaning.com/snowboots/ugg-outlet.html de http://www.inmarinhousecleaning.com/snowboots/ugg-outlet.html a