ID:               19817
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Feedback
 Bug Type:         GD related
 Operating System: Darwin 6.1 (Mac 10.2.1)
 PHP Version:      4CVS-2002-10-08
 New Comment:

I'm going to say.. it's probably not an OSX/Darwin issue.  GD is GD,
and it's been proven to be buggy in the past.  Although my hunting time
is limited, I'll try to look at it later tonight.

Can you by any chance include a backtrace for this?


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

[2002-10-10 10:08:40] [EMAIL PROTECTED]

I have added an uncompressed version of the map at the 
site. It is called "uncompressed_med.gd2"

If you are interested in where I got these huge world 
images, I got them from a nasa site. You can download them 
if you would like :-)

To give credit where it is due:
http://visibleearth.nasa.gov/cgi-bin/viewrecord?11656

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

[2002-10-10 09:39:06] [EMAIL PROTECTED]

I have added an uncompressed version of the map at the 
site. It is called "uncompressed_med.gd2"

If you are interested in where I got these huge world 
images, I got them from a nasa site. You can download them 
if you would like :-)

To give credit where it is due:
http://visibleearth.nasa.gov/cgi-bin/viewrecord?11656

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

[2002-10-10 08:22:04] [EMAIL PROTECTED]

Are you using the GD2 files at my site? I have reencoded them to work.
Do you want me to make an example GD2 file that doesn't work?

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

[2002-10-10 03:14:04] [EMAIL PROTECTED]

Maybe Darwin/Mac related problem, works fine under Linux.

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

[2002-10-08 11:15:07] [EMAIL PROTECTED]

ImageCreateFromGD2() does not recognize a uncompressed gd2 
file. It seems to work just fine with compressed GD2 files, 
but I am having problems compressing a GD2 file of mine. 
(pngtogd2 gives a "Bus error" when I try to compress, not a 
PHP problem tho)

This script:
<?php
header( "Content-type: image/png" );
$medimg = $_SERVER['DOCUMENT_ROOT'] . "/riverdata/images/
world_map_med.gd2";

$medimg = ImageCreateFromGD2Part( $medimg, $x, $y, 800, 600 
);

$img = ImageCreateTrueColor( 800, 600 );
ImageCopy( $img, $medimg, 0, 0, 0, 0, 800, 600 );
ImageDestroy( $medimg );
ImagePNG( $img );
ImageDestroy( $img );
?>

Leaves this in the error log:
[Tue Oct  8 09:25:50 2002] [error] PHP Warning:  
imagecreatefromgd2part() [<a href='http://www.php.net/
function.imagecreatefromgd2part'>
function.imagecreatefromgd2part</a>]: '/Library/WebServer/
Documents/riverdata/images/world_map_med.gd2' is not a 
valid GD2 file in /Library/WebServer/Documents/riverdata/
scripts/test.php on line 3
[Tue Oct  8 09:25:50 2002] [error] PHP Warning:  
imagecopy(): supplied argument is not a valid Image 
resource in /Library/WebServer/Documents/riverdata/scripts/
test.php on line 4
[Tue Oct  8 09:25:50 2002] [error] PHP Warning:  
imagedestroy(): supplied argument is not a valid Image 
resource in /Library/WebServer/Documents/riverdata/scripts/
test.php on line 4

The error occours when I use this command to create the GD2 
file:
% /usr/local/bin/pngtogd2 world_map_med.png 
world_map_med.gd2 800 1

and doesn't when I use this:
% /usr/local/bin/pngtogd2 world_map_med.png 
world_map_med.gd2 800 2

Usage: pngtogd2 filename.png filename.gd2 cs fmt
    where cs is the chunk size
          fmt is 1 for raw, 2 for compressed

The files that I am using can be found here:
http://144.92.10.251/riverdata/images/

Keep in mind tho that I have no way of telling that a valid 
GD2 file is being created in the first place because I know 
of nothing else that uses (or creates) the GD2 file format 
other than the GD library itself.

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


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

Reply via email to