API question

OppsOpps Registered Users Posts: 160 Major grins
I got an idea for a small script and started to look at the API to see if I could get the size of a scaled image. But I couldn't find any info about this, is it not possible or have I missed something (note, I've never used the API so I'm probably missing something)

What I want to do is to make a script that generates some custom markup for me. In order to be able generate this markup I need to know the actual image size of medium and XL sizes of an image.
--
Jan Erik Moström

Comments

  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited October 14, 2008
    There is no information specifically for this via the api, but you should be able to calculate the size from the original dimensions. Using the pixels on the longest size below...

    Small - 400px
    Medium - 600px
    Large - 800px
    XLarge - 1024px
    X2Large - 1280px
    X3Large - 1600px

    Hope this helps.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • OppsOpps Registered Users Posts: 160 Major grins
    edited October 14, 2008
    devbobo wrote:
    There is no information specifically for this via the api, but you should be able to calculate the size from the original dimensions.

    So that would mean that I had to download the original to get the size?

    (which would mean that it would be a smaller download to download medium + XL2 and check the actual dimensions -- or am I missing something)
    --
    Jan Erik Moström
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited October 14, 2008
    Opps wrote:
    So that would mean that I had to download the original to get the size?

    (which would mean that it would be a smaller download to download medium + XL2 and check the actual dimensions -- or am I missing something)

    no, you can get the dimensions of the original image from method calls like smugmug.images.getInfo.
    David Parry
    SmugMug API Developer
    My Photos
  • OppsOpps Registered Users Posts: 160 Major grins
    edited October 15, 2008
    devbobo wrote:
    no, you can get the dimensions of the original image from method calls like smugmug.images.getInfo.

    Thanks. Time to start doing some work
    --
    Jan Erik Moström
Sign In or Register to comment.