สอบถาม PHP rotate ครับ

เริ่มโดย insidecom, 22 ธันวาคม 2013, 14:59:22

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

insidecom


$image = '../images_products/'.$_GET[name]; /// LOAD NAME OF IMAGES //



$degrees = -90;



$source = imagecreatefromgif($image) ;


// $transparency = imagecolorallocatealpha( $source,255,255,255,100);
$rotate = imagerotate( $source, $degrees, 0,0);
imagealphablending($source, false);
imagesavealpha($source, true);

unlink('../images_products/'.$image);


imagegif($rotate,'../images_products/'.$image);

// imagesavealpha('../images_products/'.$image, TRUE);
imagedestroy($rotate);


เวลา Rotate ไม่อยากให้แสดง พิ้นหลังครับ ทำยังไงดี

Surakrai

#1
ลองแบบนี้ดูครับ
$transparency = imagecolorallocatealpha( $source,0, 0, 0, 127);
$rotate = imagerotate($source, $degrees, $transparency );
ผมเดาเอานะ  :wanwan012:

vii

ขอตอบว่า ลองเอา class ของผมไปแกะดูได้ครับ หรือเอาไปใช้เลยก็ได้ครับ
http://okvee.net/th/web-resources/download/V-image-class-2

ไม่ได้แกะมาตอบให้เพราะไม่ค่อยสะดวกครับ ขอโทษที