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

From: Date: Sun, 06 Oct 2002 06:58:08 +0000
Subject: #19700 [Ana->Csd]: ImageCopy() fails with true color GD2 image
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-21623@lists.php.net to get a copy of this message
ID: 19700 Updated by: rasmus@php.net Reported By: sprice@wisc.edu -Status: Analyzed +Status: Closed Bug Type: GD related Operating System: all PHP Version: 4.2.3, 4.3.0-dev New Comment: Fixed in CVS - fix merged to 4.3 release branch Note that copying a truecolor image to a palette-based image is going to be rather slow as each pixel's color is going to need to be interpolated. Previous Comments: ------------------------------------------------------------------------ [2002-10-05 21:08:38] sprice@wisc.edu 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 ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ 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

« previous php.bugs (#21623) next »