Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Apr 2009
    Thanked 0 Times in 0 Posts

    Framing An Image Possible With PHP?

    What I would like to make is a script that can download a photo from a URL and add a custom frame to it.

    The idea is for a Facebook application that I want to make where people can choose a frame and then it will output a single image file that they can choose to set as their profile picture.

    Is it possible to do something like this easily?

  • #2
    Regular Coder jfreak53's Avatar
    Join Date
    May 2004
    Thanked 10 Times in 10 Posts
    Easily? Depends on your PHP knowledge and what platform your serving on. I did something awhile back that dynamically made a signature from text the user input into a final image using a preset background.

    It's the same concept. But you would need to have a few PNG borders on the server to choose from then run the script and just place the border over the image.

    I mean there is GD and ImageMagick for image manipulation. Then PHP has it's own functions for imaging, like imagecreate and ImageColorAllocate and imagettfbbox basic ones but there are more.

    I'm running out the house right now so don't have time to write something up but a quick search on google for "php combine two images" rendered this:

    Overlaping images with GD

    Just what I was talking about. Real easy to do and quick. So make your premade borders in PNG with transparent backgrounds then just run that on server side to combine.

    PHP even has one for this:


    Enjoy, just play it can't hurt.
    "FORTRAN is not a language. It's a way of turning a multi-million dollar mainframe, into a $50 programmable scientific calculator."
    http://www.microfastcat.com -- FastCat Software, the fastest software on the NET!
    http://www.microthosting.com -- Free reseller web hosting, Hosting, VPS, FREE SMALL HOSTING!!!
    http://www.microtronix-tech.com -- Web design and programming

  • Users who have thanked jfreak53 for this post:

    Sussex_Chris (03-13-2010)


    Posting Permissions

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