Results 1 to 6 of 6

Thread: [RESOLVED] image

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    1,023

    Resolved [RESOLVED] image

    how can i check the size(height & width) of an image that is uploaded to my server, in the process of uploading?

    i currently have no upload form made yet, i'm just asking in time to see how to do this.
    Last edited by Justa Lol; Feb 12th, 2010 at 05:07 AM.

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: image

    You can use the getimagesize function in the GD library: http://uk3.php.net/manual/en/book.image.php
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3
    Fanatic Member bharanidharanit's Avatar
    Join Date
    Oct 2008
    Location
    India
    Posts
    673

    Re: image

    If that is size alone, try
    Code:
     $size=filesize($_FILES['image']['tmp_name']);
    image->imagename
    tmp_name->temporary image name in server

  4. #4
    Fanatic Member bharanidharanit's Avatar
    Join Date
    Oct 2008
    Location
    India
    Posts
    673

    Re: image

    If that is size alone, try
    Code:
     $size=filesize($_FILES['image']['tmp_name']);
    image->filename
    tmp_name->temporary image name in server

  5. #5
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: image

    he said height and width, not filesize.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    1,023

    Re: image

    well in the beginning i forgot to include (height and width) so that might be he read the topic and later searched and posted so this might be my fault, sorry if it is.

    and yes i will need filesize(in bytes) too but just not yet.

    and sorry i figured it out by going where VisualAd pointed me at, i just forgot to mark as resolved.

Posting Permissions

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



Click Here to Expand Forum to Full Width