ホームページ  >  記事  >  バックエンド開発  >  PHP QR コードとウォーターマーク画像_PHP チュートリアル

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

WBOY
WBOYオリジナル
2016-07-13 10:36:541203ブラウズ

$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...
声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。