使用PHP QR Code類庫創(chuàng)造中間帶LOGO的二維碼
Jun 13, 2016 am 11:57 AM
使用PHP QR Code類庫創(chuàng)建中間帶LOGO的二維碼
使用PHP QR Code類庫創(chuàng)建二維碼
使用舉例瀏覽器輸出:
include "phpqrcode/phpqrcode.php";
$value="http://s.bookphone.cn/chinabook/index.php/adminhtml/Croles/admin";
$errorCorrectionLevel = "L";
$matrixPointSize = "4";
QRcode::png($value, false, $errorCorrectionLevel, $matrixPointSize);
exit;
?>
文件輸出二維碼
include('phpqrcode/phpqrcode.php');
// 二維碼數(shù)據(jù)
$data = 'http://s.bookphone.cn';
// 生成的文件名
$filename = '1111.png';
// 糾錯(cuò)級別:L、M、Q、H
$errorCorrectionLevel = 'L';
// 點(diǎn)的大?。?到10
$matrixPointSize = 4;
QRcode::png($data, $filename, $errorCorrectionLevel, $matrixPointSize, 2);
生成中間帶logo的二維碼
include('phpqrcode/phpqrcode.php');
$value='http://xy.bookphone.cn';
$errorCorrectionLevel = 'L';
$matrixPointSize = 6;
QRcode::png($value, 'xiangyang.png', $errorCorrectionLevel, $matrixPointSize, 2);
echo "QR code generated"."
";
$logo = 'logo.png';
$QR = 'xiangyang.png';
if($logo !== FALSE)
{
$QR = imagecreatefromstring(file_get_contents($QR));
$logo = imagecreatefromstring(file_get_contents($logo));
$QR_width = imagesx($QR);
$QR_height = imagesy($QR);
$logo_width = imagesx($logo);
$logo_height = imagesy($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,'xiangyanglog.png');
?>

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In HTML5, width means width. The width attribute defines the width of the element's content area. You can add inner margins, borders, and outer margins outside the content area. You only need to set "element {width: value}" to the element.

On August 29, Foton Motor held a gorgeous brand refresh conference, bringing a series of exciting news to the industry. The new logo, Auman Zhilan bottom battery replacement products and the new Xiangling Q car became the focus of the press conference. Foton Motor's new logo shows the company's ambitions for the future. Foton Motor said that this new logo symbolizes the renewal and vigorous development of the brand, marking the company's entry into a new stage of development. At the press conference, Foton Motor also launched the much-anticipated Auman Smart Blue bottom battery replacement product to bring users Here comes a more convenient and efficient use experience. At the same time, the newly launched Xiangling Q car series has also attracted a lot of attention. There are 4 models in total, with prices ranging from 167,800 yuan to 168,800 yuan, providing consumers with

Alipay will change its logo every four years, so what will the logo look like in 2024? Users can see that it has a new look and a more advanced logo style. This introduction to Alipay’s 4-year new logo can tell you the specific content. The following is a detailed introduction, take a look! Alipay usage tutorial What is the new Alipay logo in 4 years? Logo display: Historical styles: 1. 2020 version Logo2, 2016 version Logo3, all versions of logo Software introduction: 1. This software was established in 2004 and has more than 1,000 life services . 2. This software is responsible for providing products and services to digital service providers, and many merchants have settled in it.

[Mobile China News] Before launching the stable version of Android 14 next month, Google has now modified the Android logo, including the logo and image (green robot). The new Android3D logo conforms to the MaterialYou theme and differs from the 2019 logo in several ways. Case: Starting with text, the first letter in Android, the letter A, is now uppercase. It used to be all lowercase. Font weight: Android’s logo font is thicker. In other words, the font weight is increased. Green Robot: The Android robot logo (also known as Bugdroid) is now 3D, with more curves, more dimensions, more characters,

Reasons and solutions for why iwatch only lights up the logo but does not turn on: 1. It is caused by insufficient power and cannot be turned on. You can put the back of the iwatch on the charger; 2. It is caused by system version problems. You can roll the system back to the stable version; 3. , caused by charger or charging cable failure, you can use another iwatch magnetic charging cable and another USB power adapter; 4. caused by hardware failure, it is recommended to go to a professional third-party testing machine for maintenance.

The screen goes black after the computer starts up and the logo is displayed. This is a problem encountered by users using the Win10 system. You can first check whether the connection cable is normal, or you can restart the computer. This article is shared by this site to solve the problem after the Win10 computer starts up and the logo is displayed. The solution to the black screen. Method 1: 1. First, press the [Ctrl+Alt+Del] key combination, and then click Task Manager. In the Task Manager window, click [File] in the upper left corner, and in the drop-down menu that opens, select [Run New Task]. Create a new task window, enter the [Explorer.exe] command, and then press [OK or Enter] (check to create this task with system administrative rights); 2. Press the [Win+S] key combination to open Windows Search

Methods include pixel value, percentage, em unit, rem unit, vw/vh unit, auto, fit-content, min-content, max-content. Detailed introduction: 1. Pixel value (px): The pixel value is fixed, and its width remains unchanged no matter how the screen resolution changes. For example: width: 300px; 2. Percent (%): The percentage width is relative to the width of the parent element. For example: width: 50%; 3, em unit, etc.

Width in iframe means the width of the specified frame, which can control the width of the iframe displayed on the page. Acceptable values ??for width: 1. Fixed pixel value, width="300px", the frame width will always remain unchanged, no matter how the size of the browser window changes; 2. Percentage value, width="50%", the width of the frame It will be adaptively adjusted according to the width of its parent element; 3. Automatic value, width="auto", the width of the frame will be adaptively adjusted according to the width of its content.
