Image Size Restrictions?

Discussion in 'HTML & Website Design' started by Muqadas.Wattoo, Aug 21, 2006.

  1. #1
    Hi,

    In my photo gallery script i have different size of images.

    I just want to place the limit to all the images not to show very big. Some images are smaller but some images are very big like 1000x700 resolution.

    Tell me the code so that image do not show more than 800x600 resolution?

    Thanks
     
    Muqadas.Wattoo, Aug 21, 2006 IP
  2. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <img src="AA.jpg" width="XX" height="YY">
    Where AA.jpg = Location of the Image File Itself
    XX = Width Size
    YY = Height Size

    So for you it would be
    <img src="AA.jpg" width="800" height="600">
     
    wd_2k6, Aug 21, 2006 IP
  3. Muqadas.Wattoo

    Muqadas.Wattoo Well-Known Member

    Messages:
    2,104
    Likes Received:
    85
    Best Answers:
    0
    Trophy Points:
    185
    #3
    But this way all small images will be sized 800x600 too.

    I just want to stop all big images those are for big resolutions. Or simply put code that will explain not to expand more then 800x600.
     
    Muqadas.Wattoo, Aug 21, 2006 IP
  4. Muqadas.Wattoo

    Muqadas.Wattoo Well-Known Member

    Messages:
    2,104
    Likes Received:
    85
    Best Answers:
    0
    Trophy Points:
    185
    #4
    
    <a href="index.php?image_id=<?echo $nextpic ?>"><img src="<? echo $settings[1]."photos/".$image_filename ?>" alt="Click this picture for another random pic" border="0"></a>
    
    Code (markup):
    This is the code in index.php page.
     
    Muqadas.Wattoo, Aug 21, 2006 IP
  5. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I've heard about max-height and max-width codes but their not compatible with IE so theres no real point in them.
    Is it not possible to resize the pictures first before upload etc.?
    Check out this thread i think it might be related to your example, the guy is trying to use JS to do it.
    http://www.webdeveloper.com/forum/showthread.php?t=118246
     
    wd_2k6, Aug 22, 2006 IP
  6. badger879

    badger879 Well-Known Member

    Messages:
    145
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    130
    #6
    Does it matter if there not compatible with ie lol Firefox is the way forward
     
    badger879, Aug 22, 2006 IP
  7. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #7
    lol yes but 90% of people i know still use IE.
    You could just put a message saying best viewed with FireFox IE users suffer with oversized pics.
     
    wd_2k6, Aug 23, 2006 IP