Random orientation of an image? (2 posts)

  1. richardx
    Posted 2 years ago #

    Wondering if any of you lovely WP'ers can help with a request from a client...

    ...they want to be able to display 12 square images in an random order (all well and good, lots of plug ins for that) but ALSO each of the images is to be displayed in a random ORIENTATION i.e. up / down / left / right.

    That's right - they want gallery of random sequence AND random orientation!

    Ideally this functionality should be incorporated with an existing gallery plug-in i.e. NextGen so they could add new sets of images later.

    If anyone knows how to do this and is willing to help then there's budget available...
    or if there's an easy hack there'll be eternal gratitude (or free beer if you are in Scotland).

    Thanks in advance.

  2. Adam
    Posted 2 years ago #

    I am unfamiliar with NextGen so I have no idea if there is a built in function for orientation? If not, your best option seems to be either jQuery (somthing like this plugin: http://code.google.com/p/jquery-rotate/) using Canvas, or CSS3 (transform). But both solutions will obviously not work in older browsers.
    A more cross-browser solution would be using the gd library functions in php (http://php.net/manual/en/function.imagerotate.php).

Topic Closed

This topic has been closed to new replies.

About this Topic