PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Nov 16, 2018 8:27 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Mar 17, 2006 4:32 pm 
Offline
Forum Commoner

Joined: Fri Aug 15, 2003 5:24 pm
Posts: 50
feyd | Please use
Syntax: [ Download ] [ Hide ]
and
Syntax: [ Download ] [ Hide ]
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  <a href="http://forums.devnetwork.net/viewtopic.php?t=21171" class="postlink">Posting Code in the Forums</a> to learn how to do it too.</span>





I'
ve got this to join 2 images together and replace the color blue from TrueColor.jpg with BackGround.jpg.

This works but there are a few blue sploches because not all blue is truely blue. So what I am looking for is a way to bring the blue tolerance up to cover the image. Both images must be a jpeg image and not png or gif.
Syntax: [ Download ] [ Hide ]
$image = ImageCreateFromJPEG("BackGround.jpg");

$icon = ImageCreateFromJPEG("TrueColor.jpg");





$trans = imageColorallocate($image, 0,0,255);

ImageColorTransparent($icon,$trans);

$width = ImageSX($icon);

$height = ImageSY($icon);





ImageCopyResized($image,$icon,0,0,0,0,$width,$height,$width,$height);


thanks


feyd | Please use
Syntax: [ Download ] [ Hide ]
and
Syntax: [ Download ] [ Hide ]
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  <a href="http://forums.devnetwork.net/viewtopic.php?t=21171" class="postlink">Posting Code in the Forums</a> to learn how to do it too.</span>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 17, 2006 4:33 pm 
Offline
BeerMod
User avatar

Joined: Tue Jan 13, 2004 5:58 pm
Posts: 2170
Location: Jax FL & Spokane WA USA
Moved to: PHPGD.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group