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 3 of 3
  1. #1
    Senior Member jf1288's Avatar
    Join Date
    Sep 2003
    Posts
    215
    Member #
    3300
    I have one php page that depending on a GET variable in the url, will fetch info from a database for a specified product. The problem i have is that this one page shows many products whos pictures have ranging sizes, but my boss wants to eliminate the 'shake' when the picture grows to full size when it loads.

    Is it possible to look at the picture in the php, and find the dimensions so that we can then echo the dimensions in the WIDTH and HEIGHT paramaters of the item?

    Thanks,
    Jordan
    If its not in Family Guy its not worth it.

  2.  

  3. #2
    Senior Member nsr81's Avatar
    Join Date
    Oct 2002
    Posts
    1,132
    Member #
    250
    Liked
    15 times
    You can use getimagesize function. It doesn't need anything special, like GD or ImageMagick.

    Example:
    PHP Code:
    $info getimagesize("img/flag.jpg");
    echo 
    '<img src="img/flag.jpg" '$info[3] .' />'
    There and Back Again :Ogre:

  4. #3
    Senior Member jf1288's Avatar
    Join Date
    Sep 2003
    Posts
    215
    Member #
    3300
    thanks, worked like a charm

    Jordan
    If its not in Family Guy its not worth it.


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 05:42 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com