Tutorials
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOtherTutorials

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old May 19th, 2006, 06:58 PM
Malice Malice is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Milwaukee, WI, USA
Posts: 2 Malice User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to Malice
The Image Merging Tutorial

hey there, i've been wanting to know how to do that for a long time, and i finally ran across a tut on how to!!

BUT, there is a problem, i hope someone can help me with it ^^

When i merge the 2, the insert image gets all distorted kinda...it adds parts to the picture...since i cant really explain it, ill link

65.30.210.152

the tut link is here:
Tutorial

here is the exact code i have for merging the 2 images...

php Code:
Original - php Code
  1.  
  2. <?
  3.  
  4.   header ("Content-type: image/png");
  5.  
  6.  
  7.   $background = imagecreatefrompng("whitealien.png");
  8.  
  9.  
  10.   $insert = imagecreatefrompng("pants.png");
  11.  
  12.  
  13.   imagecolortransparent($insert,imagecolorat($insert  ,0,0));
  14.  
  15.  
  16.   $insert_x = imagesx($insert);
  17.   $insert_y = imagesy($insert);
  18.  
  19.  
  20.   imagecopymerge($background,$insert,0,0,0,0,$insert  _x,$insert_y,100);
  21.  
  22.  
  23.   imagepng($background,"",100);


pretty much the same as the tutorial, if someone could help me get the 'pants' onto the 'alien' (lol...weird hey?), looking exactly as the image does alone, i'd be suuuper grateful, as it is really running circles around me

thank you ahead of time,
Malice


Reply With Quote
  #2  
Old May 25th, 2006, 06:33 PM
Malice Malice is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Milwaukee, WI, USA
Posts: 2 Malice User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to Malice
RE: The Image Merging Tutorial

Bump**

anyone? ^^

Reply With Quote
  #3  
Old June 14th, 2006, 05:00 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: The Image Merging Tutorial

imagecopymerge($background,$insert,0,0,0,0,$insert _x,$insert_y,100);

Make sure you put the right color value for this line in the code, in this example image background is in 0,0,0 which is back color.

Reply With Quote
  #4  
Old June 16th, 2006, 02:58 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: The Image Merging Tutorial

Sorry - but that really didnt make sense
i tried changing them to 255 - in different orders, but it just got rid of the insert image...IF you could explain a bit, i'd be very grateful, if not, then thanks for your time

Reply With Quote
Reply

Viewing: Codewalkers ForumsOtherTutorials > The Image Merging Tutorial


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway