#19700 [Ana]: ImageCopy() fails with true color GD2 image

From: Date: Sun, 06 Oct 2002 01:59:42 +0000
Subject: #19700 [Ana]: ImageCopy() fails with true color GD2 image
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-21620@lists.php.net to get a copy of this message
 ID:               19700
 Updated by:       rasmus@php.net
 Reported By:      sprice@wisc.edu
 Status:           Analyzed
 Bug Type:         GD related
 Operating System: all
 PHP Version:      4.2.3, 4.3.0-dev
 New Comment:

Yeah, once we got the backtrace info, this one was easy.  I'll fix it
in a bit unless Wez is doing it now.


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

[2002-10-05 20:57:25] kalowsky@php.net

Good thing Wez knows the answer as I have been unable to get libpng
1.2.5 to compile on Jaguar.  They have some funky Makefile magic going
on, and I don't have the patience right now to figure out their code.

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

[2002-10-05 20:48:17] sprice@wisc.edu

My girlfriend says that she will give everyone a hug if you fix this
bug and #19704. :-)

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

[2002-10-05 20:39:22] wez@php.net

The problem is that the gd library assumes that the src
image is palette based if the destination is palette based.
That causes c to be set to the ARGB value instead of the palette index
into the color map array, and hence the segfault.


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

[2002-10-05 20:29:35] sprice@wisc.edu

Silly Apple...

(gdb) p c
$1 = 1648905
(gdb) p i
$2 = 256
(gdb)

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

[2002-10-05 20:22:42] rasmus@php.net

In your backtrace there, just after you type, "bt", type:
"p c" and then "p i".  As far as I can tell, PHP is not calling this
function incorrectly.  There must be some odd Mac-specific problem
here.


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

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/19700

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



Thread (24 messages)

« previous php.bugs (#21620) next »