createimagefrom*() - How To?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • cosmiclove
    Sergeant Major

    • Oct 2007
    • 90

    createimagefrom*() - How To?

    Hello everyone,

    I would like to use the imagecreatefrom() function to call an existing image in a web page. I have been browsing lots of sites (php.net included) and forums in search of a simple methodology, but as almost always, the people explaining the tutorials would skip some important initial details assuming that you are a pro like themselves. So i here modestly request help from anyone who could show me step by step the code to use when using createimagefrom() in PHP and Blue voda. Thanks in advance!

    Herman
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: createimagefrom*() - How To?

    Why???

    I mean, if you already have the image, simply call it with the <img src="......" alt="..." > html command.

    imagecreatefrom() from gif, png, string etc is used if you want to further manipulate the image (in example, if you want to resize it, or create a thumbnail, or add some text and then create a new image, or watermark, etc).

    Returning to your request for help, please explain EXACTLY what you want to do so i might be able to provide some help.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    • cosmiclove
      Sergeant Major

      • Oct 2007
      • 90

      #3
      Re: createimagefrom*() - How To?

      I'm keeping you quite busy, Naval Thanks for your replies,

      Well, to answer the why part of your question, it's just that I *heard* and read that php could do great things with images, output images faster in a browser(right? wrong?). Since the image will be called from another php file and won't be any longer part of the HTML ouput, it can be called faster in the user's browser? (I hope im making sense, hehe)

      I am a newbie when it comes to PHP, but I read many sites talking about how powerful it could be with images, PDF files, etc.

      but if there is another option, such as referencing the image by a link as you suggested, this will be great. Since Imagecreatefrom() use existing images, I was hoping to use this function to call pictures i have in my public folder. But I just don't know the various steps involved. Thanks for taking your time to read and provide any comment you think could make my task a bit easier.

      Herman

      Comment

      • navaldesign
        General & Forum Moderator

        • Oct 2005
        • 12080

        #4
        Re: createimagefrom*() - How To?

        Originally posted by cosmiclove View Post
        Well, to answer the why part of your question, it's just that I *heard* and read that php could do great things with images, output images faster in a browser(right? wrong?).
        Wrong. A direct <img src= ....> html comand is faster

        Since the image will be called from another php file and won't be any longer part of the HTML ouput, it can be called faster in the user's browser? (I hope im making sense, hehe)
        As i said, it is SLOWER

        I am a newbie when it comes to PHP, but I read many sites talking about how powerful it could be with images, PDF files, etc.

        but if there is another option, such as referencing the image by a link as you suggested, this will be great. Since Imagecreatefrom() use existing images, I was hoping to use this function to call pictures i have in my public folder. But I just don't know the various steps involved. Thanks for taking your time to read and provide any comment you think could make my task a bit easier.

        Herman
        If you have the image in your computer, simply put it in your BV pages using BV's Image tool.

        If you don't have the image in your computer, but you have it in a folder on your site, simply insert an image in your BV page (as normally) then in the image path type the FULL image URL: http://ww.yoursite.com/folder/imagename.gif

        As i said, imagecreatefrom....() is used to CREATE an image. If you only want to call images that you already have, you don't need it. If, instead, you want to manipulate the image you already have (as mentined above) you can do it by using the imagecreatefrom...() function, but the rest can be quire complicated.

        Using php for image creation/manipulation (as well as PDF creation - your other thread - is a topic that even experienced users avoid). Certainly it is not for a begginer in php. I suggest that you first understand php and the most common tasks / procedures, before you go into the deep.
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment

        Working...
        X