Forums.Counter-Strike.com | Counter-Strike Community Forums

Go Back   Forums.Counter-Strike.com | Counter-Strike Community Forums > Miscellaneous > Off Topic > Web Design
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

COD4 Servers
Reply
 
LinkBack Thread Tools Search this Thread
Old 11-01-2006, 05:24 AM   #1 (permalink)
pinkfloYd
Member
Da Bomb
 
pinkfloYd's Avatar
 
Join Date: Nov 2006
Posts: 788
Default Image Size Restrictions?

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
pinkfloYd is offline   Reply With Quote
Old 11-01-2006, 05:57 AM   #2 (permalink)
rozerssss
Member
Terrorist
 
rozerssss's Avatar
 
Join Date: Nov 2006
Posts: 86
Default Re: Image Size Restrictions?

<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">
Reply With Quote
rozerssss is offline   Reply With Quote
Old 11-01-2006, 05:57 AM   #3 (permalink)
pinkfloYd
Member
Da Bomb
 
pinkfloYd's Avatar
 
Join Date: Nov 2006
Posts: 788
Default Re: Image Size Restrictions?

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.
pinkfloYd is offline   Reply With Quote
Old 11-01-2006, 05:58 AM   #4 (permalink)
noas
Member
Counter-Terrorist
 
noas's Avatar
 
Join Date: Nov 2006
Posts: 129
Default Re: Image Size Restrictions?

<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>

This is the code in index.php page.
noas is offline   Reply With Quote
Old 01-11-2007, 02:21 PM   #5 (permalink)
Watdaflip
Moderator
Da Bomb
 
Join Date: Nov 2006
Location: Ohio, USA
Posts: 818
Default Re: Image Size Restrictions?

Try this

PHP Code:
<? 
list($width$height) = getimagesize($settings[1]."photos/".$image_filename);
if(
$width 800)
    
$width 800;
if(
$height 600)
    
$height 600;
?>
<a href="index.php?image_id=<? echo $nextpic ?>"><img src="<? echo $settings[1]."photos/".$image_filename ?>" alt="Click this picture for another random pic" width="<?=$width?>" height="<?=$height?>" border="0"></a>
Watdaflip is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 04:59 PM.



Powered by vBulletin Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC5
Free Clan Websites and Template Hosting