Angle Image Display

trimble
trimble's picture

Joined: 2005-02-11
Posts: 5
Posted: Mon, 2006-10-30 19:07

Short of permanently rotating an image; is it possible to specify that an image be rotated x degrees for a particular display?

I ask because I'd like to modify the Travelogue theme (http://www.markwest.me.uk/changetheme-travelogue.phtml) to accept random images in its header, but don't want to store pre-rotated copies of all my snapshots.

Regards,

Mark

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-10-30 19:34

you could make a module to rotate on the fly.. would be cpu intensive on every request though. probably better to make the module pick an image, rotate and save/cache the image. use that one for some amount of time before picking a new one. all of this takes coding, of course..

 
trimble
trimble's picture

Joined: 2005-02-11
Posts: 5
Posted: Mon, 2006-10-30 22:10

While exploring my options for rotating images, I discovered that ImageMagick provides for a rotate option (http://www.imagemagick.org/script/command-line-options.php#rotate). I've also learned that Gallary has an ImageMagick plugin. Would anyone happen to know if this plugin supports the full ImageMagick option set?

Regards,

Mark

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2006-10-30 22:48

gallery only exposes rotating by multiples of 90 degree in its API. you can easily extend the imagemagick module of g2 to accept arbitrary angles.

 
trimble
trimble's picture

Joined: 2005-02-11
Posts: 5
Posted: Tue, 2006-10-31 14:02

Thanks valiant, I'll take a look at the imagemagick module and see what I can do. Whether (and how) I'm able to make it work myself or if I run into problems, I'll let you know here.

Regards,

Mark