Array getimagesize (string $filename [, Array & $imageinfo]) to get the image size
Resource Imagecreatetruecolor (int $x _size, int $y _size) Create a new true color image
Resource Imagecreatefromjpeg (string $filename) Create a new image from a
First, create a picture resource
Imagecreatetruecolor (Width,height);Imagecreatefromgif (image name);Imagecreatefrompng (image name);Imagecreatefromjpeg (picture name); draw a variety of image imagegif (picture resources, save the path);Imagepng
PHP implementation file upload and download (medium)
If you do not want to let the user see the information, you can use the error suppression symbol @; Of course, the echo can be assigned to a variable; define the user upload file type, put it in
Ask for a user-defined function to determine the image format. after writing the image, it cannot be output normally. The image is in jpg format and can be output normally without a user-defined function, the code is as follows: function & nbsp;
The code is as follows:Copy code /************************************// Function: watermark ($ bigimg, $ smallimg, $ coord = 1)// Function: add a watermark// Parameters:$ Bigimg is required. Large Image-watermark image$ Smallimg is required.
1. Function for obtaining image size getimagesize
Function getimagesize (imageel) {var I = new image (); // create an image object I. src = imageel. SRC; // assign the src attribute of the image to the srcreturn new array (I. width, I. height); //
Class qswhimgDim AsoPrivate sub class_initializeSet Aso = Createobject ("ADODB. Stream ")Aso. mode = 3Aso. type = 1Aso. OpenEnd subPrivate sub class_terminateSet Aso = nothingEnd sub
Private function bin2str (BIN)Dim I, STRFor I = 1 to lenb
Adding watermarks to Images Using ASP requires components... common applications include aspjpeg software and wsImage software developed by the Chinese people. You can search and download the two software online. We recommend that you use the
PHP implements image proportional scaling and Logo watermark function examples,
This article describes how PHP achieves image proportional scaling and Logo watermarking. We will share this with you for your reference. The details are as follows:
/***
imagecopyresampled image sampling Compression jpg is normal, PNG sample becomes 0 bytes, the system can not be opened, the code is as follows:
$width = N, $height = 200;header ("Content-type: {$data [' File_type ']}"); [File_type] =
Summary of PHP knowledge points
?
PHP Knowledge Point Summary:
?
1. Get the data submitted by the client utility $_post[];
? ? $str =$_post[' name '];
2. Implement two arrays of intersection, and, difference function:
? ? Array_intersect ($array 1,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.