|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2001-08-22 09:20 UTC] alberty at neptunlabs dot de
 Hi,
the follow 2 different scripts using ImageCreateFromGD & ImageGD2
and crashes PHP.
(using gd2.0.1 and 4.0.6)
<?php
$im_main=ImageCreateFromPNG("./images/some_picture.png");
ImageGD2($im_main,"./images/some_picture.gd2");
ImageDestroy($im_main);
?>
// the gd image is created with pngtogd from the gd lib package.
<?php
	$im_main=ImageCreateFromGD("./images/some_picture.gd");
	ImagePNG($im_main,"./images/some_picture.png");
	ImageDestroy($im_main);
?>
Regards,
-- 
Steve
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 08:00:01 2025 UTC | 
oops, i have post a message to this problem in php.dev under: "GD seg fault on save" however, here is another code example to reproduce the problem: <?php $im_main=ImageCreateFromGD('2.gd'); ImageJPEG($im_main); ?> The problem is _not_ ImageJPEG! You can reproduce the problem also with ImagePNG. here is the backtrace: ---- Program received signal SIGSEGV, Segmentation fault. gdImageJpegCtx (im=???, outfile=???, quality=???) at gd_jpeg.c:207 207 int val = im->tpixels[i][j]; (gdb) bt #0 gdImageJpegCtx (im=???, outfile=???, quality=???) at gd_jpeg.c:207 --- you can download the '2.gd' file under: http://www.alberty.de/2.gd