How to uload a BMP, GIFs?

Discussion in 'PHP' started by kids, Apr 1, 2007.

  1. #1
    I'm designing a Image Hosting. But now users can upload only gif, jpg, png. They suggest me my site should allow upload gifs and bmp. But as I now PHP don't have image functions for these images. Please help me the way to do it!

    http://www.allimagefiles.com
     
    kids, Apr 1, 2007 IP
  2. sea otter

    sea otter Peon

    Messages:
    250
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #2
    php (rather, the GD graphics extention) supports bmp files just fine.

    
    list($width, $height, $type) = getimagesize("your_image_file");
    if ($type == IMAGETYPE_WBMP || $TYPE == IMAGETYPE_BMP)
        echo 'you have a bitmap file';
    
    PHP:
    Full list of IMAGETYPE_??? codes here: http://us3.php.net/manual/en/ref.image.php
     
    sea otter, Apr 1, 2007 IP
  3. Lordo

    Lordo Well-Known Member

    Messages:
    2,082
    Likes Received:
    58
    Best Answers:
    0
    Trophy Points:
    190
    #3
    If you mean animated gif by 'gifs', then you can use a class that was programmed for that. Search google for it.
     
    Lordo, Apr 1, 2007 IP
  4. jitesh

    jitesh Peon

    Messages:
    81
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Just Try a copy() function once.
     
    jitesh, Apr 1, 2007 IP
  5. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #5
    phpTumb can handle animated gifs and BMPs. Resizing, converting, etc...
     
    nico_swd, Apr 2, 2007 IP
  6. kids

    kids Active Member

    Messages:
    411
    Likes Received:
    4
    Best Answers:
    2
    Trophy Points:
    68
    #6
    Oh! Thanks,:p
     
    kids, Apr 9, 2007 IP
  7. sukantab

    sukantab Well-Known Member

    Messages:
    2,075
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    110
    #7
    You might want to check some of the freely availale image hosting niche sites to get help.
     
    sukantab, Apr 9, 2007 IP