SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Jun 2002
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Image Resolution Ratios

    Is there anyway to find the resolution of an image through PHP? Im making an image gallery for a client, and for the most part its worked out fine, but the thumbnails of some images dont look proper.

    Any help would be greatly apreciated.

  2. #2
    SitePoint Member
    Join Date
    Jun 2002
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, so im an idiot..I got it.

  3. #3
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What was it ? I wonder...

  4. #4
    SitePoint Member
    Join Date
    Jun 2002
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I made a new function
    PHP Code:
    Function scalewidth ($file$width) {
      
    $size getimagesize($file);
      
    $height $width * ($size[1] / $size[0]);
      return 
    $targetheight;

    Last edited by Jay7779; Jun 29, 2003 at 06:47.

  5. #5
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •