ID:               27934
 Updated by:       [EMAIL PROTECTED]
 Reported By:      new at springtimesoftware dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         GD related
 Operating System: Linux
 PHP Version:      4.3.5
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Use imagecreatetruecolor to work true color images else you will with
only 256 colors (incl. background).






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

[2004-04-09 12:46:14] new at springtimesoftware dot com

Description:
------------
Hi. I think I'm encountering an error in the GD Library. This happens
in PHP Version 4.3.5 running on Linux but does not happen in Version
4.1.2 running on Windows 98.



Please download and unzip
http://www.springtimesoftware.com/public/gd-error-bmp.zip . This file
contains a bitmap file that shows two images. The top image, a picture
of a building, was generated by browsing to the file gd-error-jpg.php
(see below) on my local computer (system "localhost").



The second image is generated by browsing to the same file located on a
remote server, at address
http://www.springtimesoftware.com/public/gd-error-jpg.php .



Note that the second image appears to be grayed, which is an error.
I've localized the error to the "imagecopy" function. I don't have the
source files, so I can't debug.



You can browse to http://www.springtimesoftware.com/public/bldg.jpg to
see the original image which is processed by gd-error-jpg.php.



I thought that bldg.jpg might have an incorrect format, but using
sunset.jpg, which was generated by a different program, also results in
an error (the image is black this time).



Here are the contents of the gd-error-jpg.php file:



<?

Header("Content-Type: image/jpeg");

$file = "bldg.jpg";

$Size = getimagesize($file);

$w = $Size[0];

$h = $Size[1];

$im = ImageCreate($w, $h);

$pic = imagecreatefromjpeg($file);

imagecopy($im, $pic, 0, 0, 0, 0, $w, $h);



ImageJPEG($im);

ImageDestroy($pic);

ImageDestroy($im);

?>



Thanks,

David





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


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

Reply via email to