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

From: Date: Wed, 02 Oct 2002 16:02:17 +0000
Subject: #19700 [Opn]: ImageCopy() fails with true color GD2 image
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-21299@lists.php.net to get a copy of this message
 ID:               19700
 User updated by:  sprice@wisc.edu
 Reported By:      sprice@wisc.edu
 Status:           Open
 Bug Type:         GD related
 Operating System: Darwin v6 (Mac Server v10.2)
 PHP Version:      4.2.3, 4.3.0-dev
 New Comment:

I am getting lines in the apache error log file now (i wasn't in PHP
v4.2.3)

It seems to be stuck in some sort of loop:
[Wed Oct  2 10:52:36 2002] [notice] child pid 24976 exit signal
Segmentation fault (11)
[Wed Oct  2 10:52:38 2002] [notice] child pid 25017 exit signal
Segmentation fault (11)


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

[2002-10-02 10:34:42] sniper@php.net

correct version numbers..


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

[2002-10-02 09:36:05] sprice@wisc.edu

Welll... I did get compile warnings up the wazoo... but it worked,
which is rather amazing.

I don't *know* if GD supports this, but it seems like a reasonable
thing for it to do. It works in other functions. I need some way to
convert a true color image to palette.

imagetruecolortopalette() doesn't work (see bug #19704)
imagecopy() doesn't work (this bug)
imagecopyresized() works (but is very slow, 3 secs on a fast server
with plenty of ram)

I tried --with-gd=php and it seemed to run faster with
imagecopyresized(), but still the same error with imagecopy().

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

[2002-10-02 06:12:43] sniper@php.net

Yes, part of the reason I wanted you to try 4.3.0-dev was to show that
it compiles without trouble on macosx.. :)

Now, are you sure GD itself supports this what you try to do? As the GD
extension in PHP is just a wrapper around the GD functions. You could
also give a try for the bundled GD2 library we have now in 4.3.0-dev.
Just configure with --with-gd=php to enable it. It has some fixes which
are NOT in the 'official' gd distro.


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

[2002-10-01 22:16:35] sprice@wisc.edu

Note:
this bug may be related to one that I just submitted here:
http://bugs.php.net/bug.php?id=19704

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

[2002-10-01 21:58:58] sprice@wisc.edu

If it helps any, if you replace

$final_img = ImageCreate( 800, 600 );
imagecopyresized ( $final_img, $img, 0, 0, 0, 0, 800, 600, 800, 600);
ImageDestroy( $img );
$img = $final_img;

with

ImageTrueColorToPalette( $img, 'TRUE', 256 );

PHP still doesn't work and seems to have the same effect. This code has
the same intention tho.

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

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