Re: Bug #13617 Updated: wrong saved pictures
| From: | Daniel Beulshausen | Date: | Wed, 28 Nov 2001 14:01:18 +0000 |
| Subject: | Re: Bug #13617 Updated: wrong saved pictures | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-71930@lists.php.net to get a copy of this message | ||
At 13:41 28.11.2001 +0000, sander@php.net wrote:
ID: 13617 Updated by: sander Reported By: Lorenz.gross@gmx.de Old Status: Open Status: Feedback Bug Type: GD related Operating System: Windows 2000 Professional SP 2 PHP Version: 4.0.6 New Comment: Have you tried the php_gd.dll from 4.0.5? If not, please do that.please don't encourage them to mix extensions from different builds. daniel
And if that doesn't work, please make a SHORT sample script which reproduces your problem and post it here. Previous Comments: ------------------------------------------------------------------------ [2001-10-10 09:54:43] Lorenz.gross@gmx.de <? #complete code $Max_size = 100; $unterverzeichnis = "tn"; $anz_pic = 0; $jn = file_exists("$unterverzeichnis/.");/*-- Daniel Beulshausen - daniel@php4win.com Using PHP on Windows? http://www.php4win.comif ($jn != TRUE) { mkdir("$unterverzeichnis", 0700); echo "nicht vorhandender Ordner wurde erstellt.<br>"; }if ($bild == "") { $verzeichnis = dir(""); while($imagefile = $verzeichnis->read()) { if(strstr($imagefile,".jpg")){ $src_img = imagecreatefromjpeg($imagefile);if (imagesx($src_img) > imagesy($src_img)) { $new_w = 100;$new_h = imagesy($src_img) / imagesx($src_img) * 100;} else { $new_h = 100;$new_w = imagesx($src_img) / imagesy($src_img) * 100;}$dst_img = imagecreate($new_w,$new_h);imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img));imagejpeg($dst_img, "$unterverzeichnis/$imagefile"); echo "<img src=$unterverzeichnis/$imagefile><br>\n"; $anz_pic++; echo "Bild <b>$imagefile</b> umgewandelt. (bereits $anz_pic Stück)<br><br>\n"; }} $verzeichnis->close(); echo "<b>Verzeichnis komplett umgewandelt</b>"; } else {$imagefile = $bild; if(strstr($imagefile,".jpg")) { $src_img = imagecreatefromjpeg($imagefile);if (imagesx($src_img) > imagesy($src_img)) { $new_w = 100;$new_h = imagesy($src_img) / imagesx($src_img) * 100;} else { $new_h = 100;$new_w = imagesx($src_img) / imagesy($src_img) * 100;}$dst_img = imagecreate($new_w,$new_h);imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img));imagejpeg($dst_img, "$unterverzeichnis/$imagefile"); echo "<img src=$unterverzeichnis/$imagefile><br>\n"; echo "Bild <b>$imagefile</b> umgewandelt.<br><br>\n"; } else { echo "kein gültiges bild"; }} ?> ------------------------------------------------------------------------ [2001-10-09 13:55:19] sander@php.net Can you post a sample script? This might be a bug in GD 2.0 (just guessing). It's still a beta. You can try using the php_gd.dll from the PHP-4.0.5 package (see http://www.php.net/downloads.php) with PHP-4.0.6. ------------------------------------------------------------------------ [2001-10-09 13:36:02] Lorenz.gross@gmx.de The GB-Libary has problem to save files (JPEG), i open any and make it small und some pictures are black or driverent colors then the orginal pictures, this script has no problems with 4.0.4PL1 only in 4.0.6 ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13617&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net