coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Gizmo on May 06, 2006, 11:05:58 PM

Title: Determining if an image is in landscape or portrait orienation.
Post by: Gizmo on May 06, 2006, 11:05:58 PM
Hi Coppermine Gurus,

Is there a way to determine if an image after it's uploaded is in landscape or portait orientation before displaying? Basically determining whether the long side is horizontal or vertical. I'd like to use this information in designing a new theme so knowing this for thumbnails, intermediate and full-size images would be useful.

Cheers,

Billy
Title: Re: Determining if an image is in landscape or portrait orienation.
Post by: Stramm on May 07, 2006, 12:30:59 AM
check the pictures table... pwidth and pheight may be useful
Title: Re: Determining if an image is in landscape or portrait orienation.
Post by: Gizmo on May 07, 2006, 04:59:21 AM
Dang... why didn't I think to look there first. Thanks Stramm, hopefully I can make use of this to put forth an idea I'd like to work on. In case anyone else has done this or would like to help out, I'd like to create a theme that would allow the user to pick from a list of frames to view the photos with. Then when they order photos, they can specify a frame to have the photos printed in. These are frame masks and not actual frames that you mount a picture in.

Cheers,

Billy