Richard Korts
asked on
php Image Functions
See sample.
The first image is a jpeg. I need to know the php image function coding to produce the 2nd image (with the green background) from the first.
The first image is a jpeg. I need to know the php image function coding to produce the 2nd image (with the green background) from the first.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I'm not sure if its even possible. The only ways I can think of doing it with jpegs is to either replace the white colour for another colour; which could result in problems if there are other white ares in the image that shouldnt be replaced. Or to try to create a shape in the white areas and fill the shape with a new colour. But that means it would only fill that shape, and if you use a different image it wont work...
However if you can use gif images instead of jpeg images I have a solution for you.
Change your first image to a gif with a transparent background instead of a white background.
Then use the following php code
(Note: the output file is a gif, but it can be changed to jpeg as long as the first image is a gif)
Open in new window