You are here: Re: Replace part of an image « PHP Language « IT news, forums, messages
Re: Replace part of an image

Posted by Geoff Berrow on 01/18/07 14:06

Message-ID: <24f31$45af66b5$8259c69c$13052@news2.tudelft.nl> from Rik
contained the following:

>> Images are rectangular. To copy a polygon, you are only copying part
>> of the image. Lets say you have a black triangle on a white
>> background. The process would be something like:
>>
>> look at the first pixel of the source image.
>> if the pixel is white, move on to the next pixel
>> if the pixel is black, change the corresponding pixel in the
>> destination image to black
>> Move on to the next pixel
>>
>> Using a couple of loops you can selectively blend part of an image.
>
>Is it not simpler to make the backgroundcolor of the image that has to be
>pasted in transparant? Seems a lot less work....

It would be if that works. Never used the imagecopymerge function

--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация