Script to Resize & Upload photos

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • attenborough@gmail.com

    Script to Resize & Upload photos

    Hi, am hoping that someone may be able to help me. Im designing a small
    website using PHP and MySQL. I would like to allow my visitors to
    upload a photo via a form on it. Im worried that people will be trying
    to upload 1mb+ images, so i am looking for a php script that will
    resize that image down to a managable 50kb file (or there abouts) and
    also give me a small thumbnail to use. Presumably then the script would
    also delete the original 1mb+ photo from the server. Ive been searching
    through google for an answer, but with not a great deal of luck. Thanks
    in advance.

    Jon

  • Wei

    #2
    Re: Script to Resize & Upload photos

    It is actually very easy if you have GD lib in your php package.



    or if you have imagemagick installed, you can use command "convert -resize
    a.jpg b.jpg"


    On Wed, 05 Apr 2006 09:28:10 -0700, attenborough wrote:
    [color=blue]
    > Hi, am hoping that someone may be able to help me. Im designing a small
    > website using PHP and MySQL. I would like to allow my visitors to
    > upload a photo via a form on it. Im worried that people will be trying
    > to upload 1mb+ images, so i am looking for a php script that will
    > resize that image down to a managable 50kb file (or there abouts) and
    > also give me a small thumbnail to use. Presumably then the script would
    > also delete the original 1mb+ photo from the server. Ive been searching
    > through google for an answer, but with not a great deal of luck. Thanks
    > in advance.
    >
    > Jon[/color]

    Comment

    • Markus Ernst

      #3
      Re: Script to Resize & Upload photos

      attenborough@gm ail.com schrieb:[color=blue]
      > Hi, am hoping that someone may be able to help me. Im designing a small
      > website using PHP and MySQL. I would like to allow my visitors to
      > upload a photo via a form on it. Im worried that people will be trying
      > to upload 1mb+ images, so i am looking for a php script that will
      > resize that image down to a managable 50kb file (or there abouts) and
      > also give me a small thumbnail to use. Presumably then the script would
      > also delete the original 1mb+ photo from the server. Ive been searching
      > through google for an answer, but with not a great deal of luck. Thanks
      > in advance.[/color]

      If you want to ask a question in more than one newsgroup please
      crosspost (send it to all groups at once) rather than multipost.

      You find my answer in alt.php.

      --
      Markus

      Comment

      Working...