當前位置:首頁 » 編程語言 » php支持jpeg

php支持jpeg

發布時間: 2025-02-09 01:24:22

php如何實現水印平鋪

代碼如下:
imagick代碼:
<?php
$image = new imagick('logo.jpg');
$im = new imagick();
$im->newimage( 140, 80, new imagickpixel( "none" ) );
$draw = new imagickdraw();
$draw->setfillcolor(new imagickpixel( "grey" ));
$draw->setgravity(imagick::gravity_northwest);
$draw->annotation(10,10 ,'right');
$draw->setgravity(imagick::gravity_southeast);
$draw->annotation(5,15 ,'right');
$im->drawimage( $draw);
$image = $image->textureimage($im);
$image->compositeimage($image,imagick::composite_,0,0);
header( "content-type: image/{$image->getimageformat()}" );
$image->writeimage('wmark_text_tiled.jpg');
$image->clear();
$image->destroy();
?>

Ⅱ PHP 為什麼我調用imagecreatefromjpeg(),它說我沒有定義imagecreatefromjpeg()呢

因為你沒有打開PHP的GD庫

修改php.ini的內容,把php_gd.dll和,php_gd2.dll前面的#去掉,重啟一下apache應該就好了

熱點內容
配置高低主要看什麼 發布:2025-03-14 01:49:22 瀏覽:83
locpython 發布:2025-03-14 01:12:50 瀏覽:342
java數組的定義方法 發布:2025-03-14 00:53:25 瀏覽:517
壓縮性綳帶 發布:2025-03-14 00:30:21 瀏覽:183
如何給樹莓派編譯適合的軟體 發布:2025-03-14 00:29:45 瀏覽:376
c語言編譯器雲盤鏈接 發布:2025-03-14 00:25:23 瀏覽:348
電腦上哪個游戲可以移植到安卓上 發布:2025-03-14 00:10:32 瀏覽:473
tcl編譯器 發布:2025-03-13 23:52:59 瀏覽:323
linuxnamed 發布:2025-03-13 23:45:29 瀏覽:363
阿里雲30元伺服器 發布:2025-03-13 23:21:25 瀏覽:352