PHP QR コードとウォーターマーク画像_PHP チュートリアル

WBOY
リリース: 2016-07-13 10:36:54
オリジナル
1203 人が閲覧しました

$logo = 'logo.png';

if(is_file($logo))

{

$QR = imagecreatefromstring(file_get_contents($filename));

$logo = imagecreatefromstring(file_get_contents($logo));

$QR_width = imagex($QR);

$QR_height = imagey($QR);

$logo_width = imagex($logo);

$logo_height = imagey($logo);

$logo_qr_width = $QR_width / 5;

$scale = $logo_width / $logo_qr_width;

$logo_qr_height = $logo_height / $scale;

$from_width = ($QR_width - $logo_qr_width) / 2;

imagecopyresampled($QR, $logo, $from_width, $from_width, 0, 0, $logo_qr_width, $logo_qr_height, $logo_width, $logo_height);

imagepng($QR,$filename);

}

www.bkjia.comtru​​ehttp://www.bkjia.com/PHPjc/737700.html技術記事 $logo = 'ロゴ.png'; if(is_file($logo)) { $QR = imagecreatefromstring(file_get_contents($filename)); $logo = imagecreatefromstring(file_get_contents($logo)); $QR_width = 画像x($QR...
関連ラベル:
ソース:php.cn
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
最新の問題
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!