how to insert image into image php? - urgent

Discussion in 'PHP' started by G3n3s!s, Feb 23, 2011.

  1. #1
    Hey. I need to make image which will be dynamically changing, for example there will be url



    image.php?image1=one.gif&image2=second.gif&image3=third.gif

    and it gives me output from these given images, it means something like

    [​IMG]
    and with another parameters
    [​IMG]
    or so on :)
    thx for any help.


    EDIT: got this [​IMG]
    did it with imagecopymerge(); but I do not know why there is that dark green
     
    Last edited: Feb 23, 2011
    G3n3s!s, Feb 23, 2011 IP
  2. tygas

    tygas Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Great one, where to found the project you are working with?>
     
    tygas, Feb 24, 2011 IP
  3. G3n3s!s

    G3n3s!s Active Member

    Messages:
    325
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    80
    #3
    G3n3s!s, Feb 24, 2011 IP
  4. G3n3s!s

    G3n3s!s Active Member

    Messages:
    325
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    80
    #4
    I got it! Thanks anyways
    [​IMG]
    [​IMG]
     
    G3n3s!s, Feb 24, 2011 IP
  5. Sabbir

    Sabbir Banned

    Messages:
    210
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #5
    wow.. nice work. you can share your work with us.
     
    Sabbir, Feb 24, 2011 IP
  6. G3n3s!s

    G3n3s!s Active Member

    Messages:
    325
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    80
    #6
    it's 5 minutes work :p
    http://phpcode.eu/upload/download.php?file=54810_img.rar
    <?php
    $my_img = imagecreatefrompng("image/face0.png");
    $g = imagecreatefromgif("php.gif");
    $d = imagecreatefromgif("image/mouth3.gif");
    // Copy and merge
    imagecopymerge($my_img, $d, 0,0, 0, 0, 591, 550, 100);
    imagecopymerge($my_img, $g, 0, 0, 0, 0, 120, 65, 100);
    header( "Content-type: image/png" );
    imagepng( $my_img );
    ?>
    
    PHP:
    if you want to change mouth, just comment this imagecopymerge($my_img, $d, 0,0, 0, 0, 591, 550, 100); line

    WARNING: All images are intellectual property of Travian Games !!! I am just trying to merge images to another, it's just testing, I won't use them anymore!
     
    G3n3s!s, Feb 24, 2011 IP