Random Images - skip Widths less than..

Hi..
I'm using a variant of the effervescence theme, and my problem is with the random image function "stretching" any images in portrait orientation/aspect ratio (which are thinner than the random banner)
- i don't want to make the tall-skinny images any bigger because they'll be too tall, and they're fine for normal use
- so is there a way to get a random function to just skip any images that aren't wide enough? (e.g. anything with a width less than 600px)

apologies if this is just obvious..

Thanks in advance for any advice!

Comments

  • You will have to add code to the theme to check the width of the image returned and get another if it is too narrow.
  • - i'm sure if i was a programmer, and not just a dabbler, this would only take a sec, and be very easy to do..
    maybe someone else could give me a basic example of how this can be done?

    anyway, thanks for your reply! ZP is easily the best php gallery currently in existance.
  • OK:

    Where the code reads: ` <?php printHeadingImage(getRandomImages()); ?>` change it to
    `<?php <br />
    $image = getRandomImages();

    while (!is_null($images) && !isLandscape($image)) { $image = getRandomImages(); }

    printHeadingImage($image);

    ?>`

    Warning: I have not tried this. Also, there may not be a landscape image.
Sign In or Register to comment.