Image Processing

Discussion in 'PHP' started by chxxangie, Oct 26, 2008.

  1. #1
    i have two images. let assume is same size.
    is it possible to "add" two images become one? just like overlap...
    plz help.. :)
     
    chxxangie, Oct 26, 2008 IP
  2. logylaps

    logylaps Active Member

    Messages:
    761
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    85
    #2
    logylaps, Oct 26, 2008 IP
  3. chxxangie

    chxxangie Peon

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    
    
    $image1 = imagecreatefromjpeg("images/thumbs/my_image-thumb.jpg");
    $image2 = imagecreatefromjpeg("template_new.jpg");
    
    $new_image_width = imagesx($image2);
    $new_image_height = imagesy($image2); 
    
    imagecopymerge($image2, $image1, 0, 0, 0, 0, $new_image_width, $new_image_height, 50);
    
    imagejpeg($image2,"final3.jpg");
    
    
    PHP:
    this function is work...
    but i saw the color is a bit light (i set 50)...
    is there any way can make the color of two images look like the original?
    sorry for my poor english... :eek:
     
    chxxangie, Oct 27, 2008 IP
  4. keyaa

    keyaa Peon

    Messages:
    137
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It is possible, I'd recommend using ImageMagick API for this, especially if you're a bit familiar with ImageMagick (useful stuff).

    http://php.net/imagick
     
    keyaa, Oct 27, 2008 IP
  5. ferostive

    ferostive Active Member

    Messages:
    162
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #5
    Yes It is possible , but i think it's not easy for beginners
     
    ferostive, Oct 27, 2008 IP