SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot iamkoa's Avatar
    Join Date
    Mar 2005
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP Image Manipulation

    Hey guys,

    I need help on manipulating images with PHP.

    This is my idea:
    Create a photo gallery by using an image of a blank Polaroid as the background and overlaying the displayed photo within the blank part of the Polaroid. In other words, every image within the photo gallery would look like a Polaroid photo.

    Of course as a bonus (after the image has been placed within the Polaroid background), Id like to write a custom title within each photo. I know how to match images with text using a MySQL database, but how can I grab everything from the database and slap it all into one image, all while using my own custom font??

    I know this is A LOT to reply to all at once, but any help would be awesome. I'm not new to PHP, but I am new to image manipulation within PHP, so be gentle.

    Thanks everyone,
    Koa
    Iamkoa, LLC
    Podlodge - Software, tools, and hacks for the iPod

  2. #2
    SitePoint Addict
    Join Date
    Jan 2004
    Location
    New York
    Posts
    254
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are a lot of photo manipulation tutorials. There is a good one on SitePoint. It is basically the same as manipulating a text file. There is a variable that is the file handler (the image) and you use that handler as one of the parameters in the many functions.

    Image manipulations deal with a lot of coordinates so you will have a lot more parameters to enter.

    Also the easiest way to do the Polaroid background is to have a premade background image and put the new one on top (probably after some resizing). Adding text shouldn't be such a different experience.

  3. #3
    get into it! bigduke's Avatar
    Join Date
    May 2004
    Location
    Australia
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    why do you want to do this with GD lib anyway? use markup and css dude! far easier on the system.

  4. #4
    SitePoint Zealot iamkoa's Avatar
    Join Date
    Mar 2005
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bigduke
    why do you want to do this with GD lib anyway? use markup and css dude! far easier on the system.
    bigduke, I don't want to do anything with GD... it was just a thought. So you say markup and CSS huh? Explain what you mean! I'm all eyes!
    Iamkoa, LLC
    Podlodge - Software, tools, and hacks for the iPod

  5. #5
    get into it! bigduke's Avatar
    Join Date
    May 2004
    Location
    Australia
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok here's what
    1. look up "rounded rectangles" on sitepoint's tutorials.
    2. use GD only to generate that custom font text for the photo caption, RTFM for reference.
    3. then get some css lessons on image placement, padding, borders and use it to put the image in the "polaroid-photo-border" looking box.

    If that didn't make sense, send me the polaroid image files with the font file and anything else that might be required.


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
  •