WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Programmierung (http://www.wcm.at/forum/forumdisplay.php?f=17)
-   -   [PHP] ImageResizeTo : Bild bekommt Grünstich! (http://www.wcm.at/forum/showthread.php?t=122026)

Phil 14.01.2004 15:11

[PHP] ImageCopyResized : Bild bekommt Grünstich!
 
EDIT: Kann geclosed werden!

Man muss einfach ImageCreateTrueColor schreiben


Hallo Leute,

ich hab mit folgendem, einfachen Script ein Bild verkleinert.

PHP-Code:

<?php
     
header
("Content-type: image/jpeg");  
        
$image_name="gross.jpg";
        
$new_width=320;  
        
$new_height=240;  
        
$source_path="./";                                                                  

$destination_path="./thumbnails/";     
        
$destimg=ImageCreate($new_width,$new_height) or die("Problem In Creating image");
        
$srcimg=ImageCreateFromJPEG($source_path.$image_name) or die("Problem In opening Source Image");
        
ImageCopyResized($destimg,$srcimg,0,0,0,0,$new_width,$new_height,ImageSX($srcimg),ImageSY($srcimg)) or die("Problem In resizing");
        
ImageJPEG($destimg,$destination_path.$image_name) or die("Problem In saving");
?>

Wenn ich das Bild verkleinere: Siehe Anhang

Phil 14.01.2004 15:12

kommt das eklige grün raus:

Siehe Anhang.

Woran liegt das?
Weiß einer was ich da falsch mache? :confused: :confused:

Dankö!

Phil 14.01.2004 15:13

.


Alle Zeitangaben in WEZ +2. Es ist jetzt 09:35 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag