background of top image in imagecopymerge

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Renidrag
Forum Newbie
Posts: 4
Joined: Tue Feb 19, 2008 1:59 pm

background of top image in imagecopymerge

Post by Renidrag »

I have a process that i have to take a clients image that is always jpg format and rescale it and have it display in a product thumb, now these thumbs are all the same size so i want to use a background pattern image and merge the two

I can do all this fine - but when i put the scaled down jpg image on top of the set size thumb and there is any extra space horizontally or vertically that space is black - now i did set the transparent color to black and remove it, but it also removes black in the clients image

anymore suggestions on how to handle this, working with images is fairly new to me in php and it seems php has a vast array of functions to handle images, so I think i am just on information overload and over looking what I should be doing.

Thanks in advance for any pointers
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: background of top image in imagecopymerge

Post by greyhoundcode »

Perhaps you could post your code, or a diagram or something? I can't quite picture exactly what you are doing, but, it sounds like you are trying to remove the black colour after having merged the two images. Why not try to remove it before combining the two?
Post Reply