php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30991 problem in image transparancy
Submitted: 2004-12-06 05:57 UTC Modified: 2004-12-07 13:17 UTC
From: mars at talash dot net Assigned: pajoye (profile)
Status: Not a bug Package: GD related
PHP Version: 4.3.9 OS: windows NT/2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mars at talash dot net
New email:
PHP Version: OS:

 

 [2004-12-06 05:57 UTC] mars at talash dot net
Description:
------------
In my php.ini file,
i enabled GD only.

ie) uncomment that one line for gd configuration


Reproduce code:
---------------
$logoImage is png image.
        $image1 = ImageCreateFromPNG($logoImage);
        $color=imagecolorat($image1,$mouseX,$mouseY);
        imagecolortransparent($image1,$color);
         ImagePNG($image1,"$logoImage");

after transparant a color in image. save that image .

what the problem is,
  after that i transparent another color in that image ,last color is only
tranperant. previous color revoke it's original place.

for example :
     imagecolortransparent($image1,$color);
     imagecolortransparent($image1,$color1);
     imagecolortransparent($image1,$color2);
     imagecolortransparent($image1,$color3);


Expected result:
----------------
after excution only that image transperant for $color3
but i want a transparent image with all four color.
what can i do?
any other functions..


Actual result:
--------------
only image with last color transparancy.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-06 10:08 UTC] pajoye@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

You can use only one transparent color.

With formats that support alpha channel, use the alpha channel.

--Pierre
 [2004-12-07 10:15 UTC] mars at talash dot net
hi,
sorry for the disturbance.
plz give some sample code to use alpha channel.

or give some better sollution.

plz .
thanks & regards,
mars
 [2004-12-07 13:13 UTC] mars at talash dot net
hi,
 what happened.
i need solution.
plz help me.
plz thanks in advance,
regards,
mars,India
 [2004-12-07 13:17 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 20:01:31 2024 UTC