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

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

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().


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

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

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

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

Nope, CVS snapshot doesn't work, same problem.

(It actually compiled on OS X without trouble. Weee!!)

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

[2002-10-01 20:31:56] sniper@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip

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

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