Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: "Change image" - PHP???  (Read 7956 times)

0 Members and 1 Guest are viewing this topic.

Bannana97

    Topic Starter


    Intermediate
  • Owner of HerbertsWorld Corporation
    "Change image" - PHP???
    « on: July 20, 2009, 07:09:35 PM »
    I am trying to make something that will allow a use to recolor different things in an image.
    Theres a few parts.

    Head, right leg, left leg, head, torso, right arm, left arm.

    I dont know how to do this, though. I know its done with php.

    Can someone help me find a link to a website that shows how?
    Thanks
    Bannana97

    Rob Pomeroy



      Prodigy

    • Systems Architect
    • Thanked: 124
      • Me
    • Experience: Expert
    • OS: Other
    Re: "Change image" - PHP???
    « Reply #1 on: July 20, 2009, 11:28:23 PM »
    It depends which image library you have installed with PHP.  I usually use GD.  Full references here: http://www.php.net/manual/en/refs.utilspec.image.php
    Only able to visit the forums sporadically, sorry.

    Geek & Dummy - honest news, reviews and howtos

    kpac

    • Web moderator
    • Moderator


    • Hacker

    • kpac®
    • Thanked: 184
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 7
    Re: "Change image" - PHP???
    « Reply #2 on: July 21, 2009, 03:05:10 AM »
    The default WordPress theme's header image does something like this.

    Bannana97

      Topic Starter


      Intermediate
    • Owner of HerbertsWorld Corporation
      Re: "Change image" - PHP???
      « Reply #3 on: July 21, 2009, 09:06:07 AM »
      But how would I combine two images, or more?
      Thanks
      Bannana97

      kpac

      • Web moderator
      • Moderator


      • Hacker

      • kpac®
      • Thanked: 184
        • Yes
        • Yes
        • Yes
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 7
      Re: "Change image" - PHP???
      « Reply #4 on: July 21, 2009, 09:46:05 AM »
      I don't think GD can combine images. Maybe ImageMagick can.

      Rob Pomeroy



        Prodigy

      • Systems Architect
      • Thanked: 124
        • Me
      • Experience: Expert
      • OS: Other
      Re: "Change image" - PHP???
      « Reply #5 on: July 21, 2009, 10:14:51 AM »
      But how would I combine two images, or more?

      Have you read the manual yet?  http://www.php.net/manual/en/function.imagecopymerge.php

      I don't think GD can combine images.

      Have you read the manual yet?  ;)
      Only able to visit the forums sporadically, sorry.

      Geek & Dummy - honest news, reviews and howtos

      kpac

      • Web moderator
      • Moderator


      • Hacker

      • kpac®
      • Thanked: 184
        • Yes
        • Yes
        • Yes
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 7
      Re: "Change image" - PHP???
      « Reply #6 on: July 21, 2009, 11:14:45 AM »
      No actually!

      But I have now. Most of the examples just use one image.....

      Bannana97

        Topic Starter


        Intermediate
      • Owner of HerbertsWorld Corporation
        Re: "Change image" - PHP???
        « Reply #7 on: July 21, 2009, 12:05:01 PM »
        Have you read the manual yet?  http://www.php.net/manual/en/function.imagecopymerge.php

        Have you read the manual yet?  ;)

        I dont understand that D:
        Thanks
        Bannana97

        Rob Pomeroy



          Prodigy

        • Systems Architect
        • Thanked: 124
          • Me
        • Experience: Expert
        • OS: Other
        Re: "Change image" - PHP???
        « Reply #8 on: July 22, 2009, 10:13:50 AM »
        But I have now. Most of the examples just use one image.....

        copymerge - there's a clue in the function name.  Merge one image in, then another, then another, etc.  Or use functions to create the entire image in one, programmatically.
        Only able to visit the forums sporadically, sorry.

        Geek & Dummy - honest news, reviews and howtos