ID:               38764
 User updated by:  markg852 at hotmail dot com
 Reported By:      markg852 at hotmail dot com
 Status:           Bogus
 Bug Type:         GD related
 Operating System: Windows XP, linux
 PHP Version:      5.1.6
 Assigned To:      pajoye
 New Comment:

Thanx alot that worked how i wanted it.
but it might be a idea to put something like this in the php
documentation aswell.. maybe here:
http://nl3.php.net/manual/en/function.imagefill.php i couldn`t find it
anywhere and people on the ##php channal (irc) on freenode couldn`t
offer a solution aswell.. so this might be verry unknown.

Again Thanx


Previous Comments:
------------------------------------------------------------------------

[2006-09-09 23:28:57] [EMAIL PROTECTED]

First of all no need to be loud.

It was not a suggestion but a fact.

In this image "uitkomstvc4.png", the left sude shows the artifacts
resulting from a wrong/no transparent color.


Just try:

$thumb = imagecreatetruecolor($newwidth, $newheight);
imagefill($thumb,0,0, 0xffffff);
.. do the copy/save with transparent color or blend mode..

and then do the copy, you will have what you have on the right side. It
is all about alpha component and background color of two separate
images.

Again, there is no bug, not in the gd and not in php.


------------------------------------------------------------------------

[2006-09-09 22:28:51] markg852 at hotmail dot com

@ [EMAIL PROTECTED]
i even tested the 6.0.0-dev snapshot and it still has the exact same
issue.

@ [EMAIL PROTECTED]
tested your suggestion and the result is still exactly the same.

and just to be sore.. i`m talking about the QUALITY!!! that`s just
different.. just look at the image i supplied in the first image.

Could this be a bug in GD itself (so not php`s fault) or in php_gd.dll
?

------------------------------------------------------------------------

[2006-09-09 22:16:22] [EMAIL PROTECTED]

doh, submit too quickly

all you have to do:
imagecolortransparent($thumb, 0);
imagealphablending($thumb, false);

the fist to set the bgd color, the second function to keep the alpha
information while copying (no blend ops).

------------------------------------------------------------------------

[2006-09-09 22:13:18] [EMAIL PROTECTED]

There is no bug.

You copy an image to a another image. The destination image has no
transparent color defined. True color images are "filled" with black by
default, that's why you see black instead of the transparent color.

short version: all you need to do is:
ImageColorTransparent($thumb, 0);





------------------------------------------------------------------------

[2006-09-09 21:51:58] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip



------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/38764

-- 
Edit this bug report at http://bugs.php.net/?id=38764&edit=1

Reply via email to