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

From: Date: Sun, 06 Oct 2002 02:08:38 +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-21621@lists.php.net to get a copy of this message
 ID:               19700
 User updated by:  sprice@wisc.edu
 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:

For compiling libpng in Jaguar I use:
% cp scripts/makefile.macosx ./Makefile
% make ZLIBINC="/usr/lib" ZLIBLIB="/usr/lib"
% sudo make install
% sudo ranlib /usr/local/lib/libpng.a

I get one error, but as far as I can tell it compiles the libpng.a just
fine.

Error is:
cc -o pngtest -fno-common -I/usr/lib -O  pngtest.o -L. -L/usr/lib -lpng
-lz -current_version 0.1.2.5
cc: -current_version only allowed with -dynamiclib
make: *** [pngtest] Error 1


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

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

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

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

[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)

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

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 (#21621) next »