![]() |
|
RandomImage heightxwidth + greythumb - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: RandomImage heightxwidth + greythumb (/thread-4255.html) |
RandomImage heightxwidth + greythumb - jnylund - 2008-12-15 Hello! I have been wondering how I could edit following code so that I could determine width and height of random image. I tried almost everything. <?php $randomImage = getRandomImages(); $randomImageURL = getURL($randomImage); echo " <img src='". $randomImage->getSizedImage(150) . "' alt=\"random image\"\n" . $randomImage->getTitle() . '" />'; ?> ...and is it somehow possible to turn that random image to grey but the orginal (when clicking the link) would stay coloured. RandomImage heightxwidth + greythumb - acrylian - 2008-12-15 1. You can get the width and height of that image with `$randomImage->getWidth()/$randomImage->getHeight()`. Or what do you mean? 2. There is not Zenphoto function for this but you probably can something for that using the GDLib's functions. RandomImage heightxwidth + greythumb - jnylund - 2008-12-15 Oh sorry, I spelled wrong. I meant that I could adjust the thumb size without touching <img style="width: blaa; height: blaa".... So like $randomImage->getSizedImage(150x130) or something with working function. RandomImage heightxwidth + greythumb - sbillard - 2008-12-15 The Effervescence+ theme uses the image size in creating the surrounding frame. You can look at that theme to see how it does this. There are a number of custom image thumb functions depending on what you want to accomplish. Please search the functions guide for these functions. |