image dimensions

It is possible to get the image dimensions especially if the current image is vertical or horizontal.
I want to make rollover image navigation like in stopdesign gallery theme.

Comments

  • nobody any idea or suggestion?
  • trisweb Administrator
    I'm planning on adding this to the next version -- the ability to get the original dimensions, the resized dimensions, or whether it's landsape or portrait.

    Currently it's quite difficult, but you could use PHP image functions to (inefficiently) get the sizes.
  • I just wondering what is the options available when it come to display the picture either landscape or portrait automatically?

    What I do at the moment is just save the picture to whatever way that I need them to be seen via "Window Picture n Fax Viewer" :) before upload.
  • trisweb Administrator
    It might be in the EXIF data for the image, but we haven't really considered this yet. There are a couple options, including letting you rotate within ZP. We'll see.
  • Is there any way to do this yet? Get the size of the original image? I've been looking through the code, but haven't found any yet.

    I'm also thinking of writing my own function for it, but not sure where the best place to implement it would be.
  • Nevermind. I found the answer. I was looking at code from 1.0.2.

    FYI for anyone reading this. Getting the dimensions of the original image is now supported as of 1.0.3.
  • trisweb Administrator
    You are correct! The theme functions are not documented yet (hopefully will be soon), but look in template-functions.php for a "raw" list.

    For quick reference, the functions are:
    // Returns an array [width, height] of the default-sized image.
    function getSizeDefaultImage()

    // Returns an array [width, height] of the original image.
    function getSizeFullImage()

    // The width of the default-sized image (in printDefaultSizedImage)
    function getDefaultWidth()

    // The height of the default-sized image (in printDefaultSizedImage)
    function getDefaultHeight()

    // The width of the original image
    function getFullWidth()

    // The height of the original image
    function getFullHeight()

    // Returns true if the image is landscape-oriented (width is greater than height)
    function isLandscape()

    // Returns an array [width, height] of the image sized based on the given parameters.
    function getSizeCustomImage($size, $width=NULL, $height=NULL, $cropw=NULL, $croph=NULL, $cropx=NULL, $cropy=NULL)
  • relee Member
    HI folks-the pics I take in portrait mode are not rotated correclty. Anyone have any suggestions on how to get them to be correclty rotated?
    Thanks
  • Rotate them before uploading to your gallery. You can accomplish that with these:
    • Photoshop
    • Windows Image Viewer
    • IrfanView
    • etc.
  • trisweb Administrator
    I personally like using Picasa2 (google it) to manage all my photos, then select the ones to upload to ZP and export them. They're rotated automatically.
  • relee Member
    Thanks for your replies. When i view the images in Adobe PS they are all correctly rotated. I'm gonna try picasa2.
  • trisweb Administrator
    Any good photo editor/viewer will correctly rotate them based on EXIF data, but Zenphoto doesn't have a good EXIF implementation yet, so we've been waiting on that. Hopefully we can get that in the next version.
  • relee Member
    hmmm, I d/l picasa2=impressive. How do you export to my zenphoto folder on my site?
  • relee Member
    http://www.re-lee.com/photos. I have rotated my portrait images to be the correct orientation in Nikon's Picture Project software or with Windows Viewer. The images are still in landscape when they should be in portrait. Any other suggestions?
Sign In or Register to comment.