#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    15
    Rep Power
    0
    I use PHP to enable people to upload an image directly to my site. The problem I have is that I need all these images to be a certain size(200x140pixels). Currently the only form of checking on images I know is the $picture_size variable. I use this to limit the size of the uploaded image to 25kb. Is there a way to check the physical size of the image, So that only images of the correct size can be uploaded?
    Many Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jul 2000
    Posts
    669
    Rep Power
    15
    GetImageSize($imagename); will return you an array with several attributes including height and width but that is only after it is copied to its final resting place. You could run a function after it is uploaded to check the dimensions and delete if the are too big
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    15
    Rep Power
    0
    Thanks for the advice....its all working great now.

Similar Threads

  1. The Soothingly Seamless Setup of Apache, SSL, MySQL, and PHP
    By guest in forum Development Articles
    Replies: 631
    Last Post: January 13th, 2004, 04:41 PM
  2. postgresql installation help
    By lightyears in forum PostgreSQL Help
    Replies: 3
    Last Post: November 2nd, 2003, 06:38 PM
  3. libtool-1.3.4_4 and bash settings
    By wacko_cracko in forum BSD Help
    Replies: 2
    Last Post: May 16th, 2003, 12:30 PM
  4. php installation issues - red hat linux
    By SiFactor in forum Linux Help
    Replies: 3
    Last Post: February 26th, 2003, 09:17 PM
  5. Problems installing KDE Decoration
    By Jestah in forum Linux Help
    Replies: 10
    Last Post: November 7th, 2002, 12:41 PM

IMN logo majestic logo threadwatch logo seochat tools logo