custom sized random image

I tried to do it on my own but I got all messed up..

I would like a full size, uncropped random image at a certain size, such as is done in the printCustomSizedImageMaxSpace..

I know I could take a random image and have it show up, but some of my pictures are portrait, others are landscape style, and getCustomImage just doesn't cut it. Any tips?

Comments

  • are you sure

    `
    <?php printCustomSizedImageMaxSpace(getBareImageTitle(),640,640); ?>
    `
    does not work for you?

    640px is the size for both sides in example, just to make sure you get that.
  • That works for a specific image if the image (such as the main image showing on image.php) is called. It does not seem to work for random images, at least not in my tests.
  • acrylian Administrator, Developer
    Please take a close look at the getCustomImage() functions. You can set cropping in it's options.
  • hey acrylian,
    I would like an uncropped random image showing up.. I know how to crop with getcustomimage. at first I used it with width 230 and height 230 but this automatically cropped my portrait style photos where height > width
  • acrylian Administrator, Developer
    To get an uncropped image you should only set either size or only width or height. If you set width and height you get always an cropped image.
  • For example, some of my pictures are 600x400 and some others are 400x600, which is why I wanted the max space fxn.. Guess I can just make my own function.
  • Ok, I wrote my own function to do what I wanted.

    --- edit -- I wrote something else here but I figured it out so no worries.
Sign In or Register to comment.