Jump to content

PNG merge Prodblem


neugi

Recommended Posts

Hi,

 

i've got 2 png 8 with alpha.

 

i want to merge this 2 images. everything seems to be okay.

 

i got the background with some parts transparent and the numbers i want to render on it. but if i take a close look i can see that at the boundary of the numbers there is no background, even no background form the image below.

 

how can i fix this.

 

attached is the image that has been renderd.

 

my code is :

 

$stoerer = imagecreatefrompng('image/neu/1er.png');
$letter = imagecreatefrompng($norm[$this->vorWert[$i]]);
@imagecopy($stoerer, $letter, $left,$top,0,0,$letterWidth,$letterHeight);

 

maybe somebody can give me a hint how to get this working.

 

best

 

 

Link to comment
Share on other sites

hi,

 

if i replace @imagecopy($stoerer, $letter, $left,$top,0,0,$letterWidth,$letterHeight); widht @imagecopymerge($stoerer, $letter, $left,$top,0,0,$letterWidth,$letterHeight,100);

 

the transparent part disapear but the letters look bad.

 

is there a way to render the letters on the image so that the brackground is beeing shown behind the transparent parts of the letters?

 

best

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.