SitePoint Sponsor

User Tag List

Results 1 to 14 of 14

Thread: images

  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2001
    Location
    Monmouth Junction, NJ
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anyone know what module an be use din php to resize images so i could create thumbnails

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use the GD library if you have it compiled in with PHP, or You can ImageMagick which is a hell of a lot easier if you ask me, you can get versions for unix and win at http://www.imagemagick.org/
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2001
    Location
    Monmouth Junction, NJ
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    alright thank you. How do I learn how to use ImageMagick in php?

  4. #4
    SitePoint Zealot
    Join Date
    Jun 2000
    Location
    Yeppoon, Australia
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is exactly the thing I have been looking for a site I'm about to start on, what an incredible program. Oh the feeling of joy I now have (more relief I think).

    Now, my question follows that of GoD's, how can this be used in PHP? I see it has PERL capabilities and they don't seem all that hard to follow, can you call PERL scripts from PHP? or say at the end of processing a form with PHP into a DB, have some sort of call at the end of the page from HTML, I just need it to create thumbnails from uploaded images, nothing overly complex.
    Knowledge is knowing that a tomatoe is a fruit; wisdom is not putting it in a fruit salad.

  5. #5
    SitePoint Enthusiast
    Join Date
    Feb 2001
    Location
    Monmouth Junction, NJ
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  6. #6
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or use ImageMagick

    1) Install it on your server

    2) Create a form to upload an image

    3) the php

    PHP Code:
    //Assuming you copied the images correctly this will resize the image named "thumb_$filefromfield"

    will be resized to 50 pixels by 50 pixels

    copy
    ($filefromfield$filedestination);
    copy($filefromfield"thumb_".$filedestination);
    exec("mogrify -geometry 50x50! "thumb_".$filedestination"); 

    Of course you will need to adjust to make it work in your script, but this is the basics.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  7. #7
    SitePoint Zealot
    Join Date
    Jun 2000
    Location
    Yeppoon, Australia
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Excellent, thanks very much Freddy.

    Just to clarify... is installing on the server putting it into the CGI bin?

    When actually using the program, is this PERL being called from PHP or does ImageMagick have PHP functions?

    Thanks very much for your help
    Knowledge is knowing that a tomatoe is a fruit; wisdom is not putting it in a fruit salad.

  8. #8
    SitePoint Enthusiast
    Join Date
    Feb 2001
    Location
    Monmouth Junction, NJ
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yea it does just ask freddyphp though he knows more contact him on aol or icq

  9. #9
    SitePoint Evangelist
    Join Date
    Feb 2000
    Location
    England
    Posts
    568
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anyone know of an imagemagik and php tutorial?

  10. #10
    SitePoint Enthusiast
    Join Date
    Feb 2001
    Location
    Monmouth Junction, NJ
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i dont think there might be one available because i searched the net for it earlier

  11. #11
    SitePoint Zealot
    Join Date
    Jun 2000
    Location
    Yeppoon, Australia
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I shall have a play and see what happens
    Knowledge is knowing that a tomatoe is a fruit; wisdom is not putting it in a fruit salad.

  12. #12
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You are gonna need root access to compile ImageMagick on your server. It is a program that runs on the server so what you can do with php as with perl is make system calls to the program. There isn't very much documentation, you kinda just have to mess with it.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  13. #13
    SitePoint Zealot
    Join Date
    Jun 2000
    Location
    Yeppoon, Australia
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmmm, I want to use a host such as hostrocket or hostgo or something else where I won't have root access. This being the case, would I be better off going with GD?

    What host do you use or recommend Freddy? I am not the one paying for it and I need features.
    Knowledge is knowing that a tomatoe is a fruit; wisdom is not putting it in a fruit salad.

  14. #14
    SitePoint Evangelist
    Join Date
    Feb 2000
    Location
    England
    Posts
    568
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freddydoesphp
    You are gonna need root access to compile ImageMagick on your server. It is a program that runs on the server so what you can do with php as with perl is make system calls to the program. There isn't very much documentation, you kinda just have to mess with it.
    I got a dedi and got it all installed with imagefolio working fine, i just don't know how to use it myself.. will do some playing


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
  •