Image Size

Discussion in 'PHP' started by Trance-formation, Oct 11, 2004.

  1. #1
    Is there any way of setting the code on a page so that I can use it to pull the image source from from a number of surces, standardise the width but still allow the height to be in proportion to the original? eg

    <img src="thingy" height=200 width=originalwidth/(originalheight/200)>

    ?

    Or would I need to write a little php script into the page?
     
    Trance-formation, Oct 11, 2004 IP
  2. mopacfan

    mopacfan Peon

    Messages:
    3,273
    Likes Received:
    164
    Best Answers:
    0
    Trophy Points:
    0
    #2
    That would definitely have to be a server side script or a javascript application to do something like that.
     
    mopacfan, Oct 12, 2004 IP
  3. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #3
    do you know php? can you run php on your server? It could do that idea.
     
    TwisterMc, Oct 12, 2004 IP
  4. Trance-formation

    Trance-formation Peon

    Messages:
    598
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    just found the getimagesize() which does exactly that... prob over.. thanks guys
     
    Trance-formation, Oct 12, 2004 IP
  5. Trance-formation

    Trance-formation Peon

    Messages:
    598
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Karamba! getimagesize() works :)

    (message to Owlcroft... just modifying your Freebie to fit my site style, and wanted to shrink the amazon pictures... works a treat :D )
     
    Trance-formation, Oct 13, 2004 IP