How to display the height and the width of the original image next to it's thumbnail
I can display thumbs of several images in a list. I can also display custom attributes (such as description, filetype and size) next to them. But I cannot display the default(!) attributes height and width of the original images in the file manager. It is nessesary to let the guest know the dimensions of the original file
This (for example)
<li> <div style="float: left; width: 150px; "> <?php $im->outputThumbnail($f, 150, 250);?> </div> <div style="float: right; width: 300px; "> <?php echo $tip_text;?> <br> <?php echo $f->getSize();?> <br> <?php echo $f->getwidth();?> <br> <br> <br> <a href="<?php echo $fv->getURL();?>">download</a></div> <div class="clear"></div>
So far so good, but what is the function to display width and height.
I am looking forward for your help people...
It works perfect. Thank You! And it is soooo simple...
My last try was ...
... but it only works when I write the complete path into the code (XXX). I doesn't work with "getPath" or "getURL".
So I gave up...
$src = $f->getRelativePath();
Sorry. I also tried that. But it also doesn't work.
At all three options C5 displays (echo) the right path in the browser. When I copy the path from the browser and put it into the code, it works fine. But when I insert "$src = $f->getPath();" or one of the other options into the code, C5 displays the alert (see above). Maybe it is a bug.
I forgot to tell you, that the problem-code was part of a template for the Add On "List Files from Set". Maybe that causes path problems.
Nevertheless the problem is solved for me now.
But I will try to rebuild that code tonight.
$dimensions = $f->getAttribute('width')." x ".$f->getAttribute('height');
and added this line just below the thumbnail output:
<div><?php echo $dimensions ;?></div>