[PHP-DEV] Bug #13617 Updated: wrong saved pictures

2001-12-19 Thread sander

ID: 13617
Updated by: sander
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Closed
Bug Type: GD related
Operating System: Windows 2000 Professional SP 2
PHP Version: 4.0.6
New Comment:

No feedback. Closing.

Previous Comments:


[2001-11-28 08:41:18] [EMAIL PROTECTED]

Have you tried the php_gd.dll from 4.0.5? If not, please do that.

And if that doesn't work, please make a SHORT sample script which reproduces your 
problem and post it here.



[2001-10-10 09:54:43] [EMAIL PROTECTED]

?
#complete code

$Max_size = 100;
$unterverzeichnis = tn;
$anz_pic = 0; 

$jn = file_exists($unterverzeichnis/.);
if ($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/$imagefilebr\n;
$anz_pic++;
echo Bild b$imagefile/b umgewandelt. (bereits $anz_pic 
Stück)brbr\n; 
}
} 
$verzeichnis-close();

echo bVerzeichnis 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/$imagefilebr\n;
echo Bild b$imagefile/b umgewandelt.brbr\n; 
} else {
echo kein gültiges bild;
}

}
?



[2001-10-09 13:55:19] [EMAIL PROTECTED]

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] [EMAIL PROTECTED]

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=13617edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13617 Updated: wrong saved pictures

2001-11-28 Thread sander

ID: 13617
Updated by: sander
Reported By: [EMAIL PROTECTED]
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.

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] [EMAIL PROTECTED]

?
#complete code

$Max_size = 100;
$unterverzeichnis = tn;
$anz_pic = 0; 

$jn = file_exists($unterverzeichnis/.);
if ($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/$imagefilebr\n;
$anz_pic++;
echo Bild b$imagefile/b umgewandelt. (bereits $anz_pic 
Stück)brbr\n; 
}
} 
$verzeichnis-close();

echo bVerzeichnis 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/$imagefilebr\n;
echo Bild b$imagefile/b umgewandelt.brbr\n; 
} else {
echo kein gültiges bild;
}

}
?



[2001-10-09 13:55:19] [EMAIL PROTECTED]

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] [EMAIL PROTECTED]

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=13617edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]