Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4

Thread: Max image width

  1. #1
    Member
    Join Date
    Nov 2002
    Location
    Elmira, NY
    Posts
    41
    Member #
    261
    Is there a way of limiting the size of an image to be shown. like i am working on a photogallery and i want to make it so no image shown can be larger ?pixels x ? pixels if it is i want it to be resized. Maybe php wouldnt even do it

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    You need the GD library (http://www.php.net/manual/en/ref.image.php) to work with images in detail. It can take a bit of a learning curve to figuring out how the library's functions work, but once you get over it it's very easy to work with.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    Senior Member Arunan's Avatar
    Join Date
    Jan 2003
    Location
    Toronto, Ontario
    Posts
    139
    Member #
    478
    Filb...would you know of any php.net oriented tutorials for ImageMagick?
    Arunan S.
    CEO/President
    ServerLines, LLC.

  5. #4
    Junior Member Kriek's Avatar
    Join Date
    Mar 2003
    Location
    Florida
    Posts
    16
    Member #
    828
    Here's a nice little trick I picked up while coding online art galleries. The idea is to create an image with the given height and width then echo that to the rest of the images in your gallery using that information.

    PHP Code:
    <?php $size GetImageSize ("main/default.jpg"); ?>

    <img src="main/something.jpg" <?php echo $size[3]; ?> border="0" alt="">
    Everyone remain calm, I've done this before.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:48 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com