Php obtains the flash size information instance. Example code: print_r(getimagesize(www.45it.comtempletsdefaultimageslogo.gif); output result: Array ([0] 550 [1] 190 [2] 3 [3] width550height190 example
The code is as follows:
Print_r
In php, adding watermarks to Chinese characters requires some simple processing. one is to convert characters into gbk, and the other is to load Chinese fonts, with these two conditions, adding a Chinese watermark to the image is simple. Example 1
Copy CodeThe code is as follows:
Original image
$DST = "/upload/20120914/20120914040740-0.jpg"; Note that the picture path should be correct
Get the original picture information
$DST _info = getimagesize ($DST);
Switch ($DST _info[2])
{
Case 1:
$DST
The following provides three code generation, compatibility is quite good, you can also customize the height and width oh.
function Imageresize ($srcfile, $tow, $toh, $tofile = "")
{
if ($tofile = = "") {$tofile = $srcfile;}
$info = "";
$data
Upload Avatar, interface no jump way a lot, I used to add an iframe that kind. Directly below the code.
Html:
Copy CodeThe code is as follows:
The route is the back-end interface
Upload/avatar the saved address for the uploaded
Text Watermark
Text watermark is to add text on the picture, the main use of GD library Imagefttext method, and the need for font files. As follows:
The implementation code is as follows:
Copy the Code code as follows:$dst _path = ' dst.jpg
This function can obtain some basic information about the image, including the width, height, type, and size of the image. it mainly uses the getimagesize function provided by php. for specific usage, see The php Manual. This function can obtain
How to start to design a qualified class, the first to write class{} is wrong, the right is nothing to write, but assume that the class already exists, this object already exists, various attribute methods have already, under this completely
Now we first design a showimg. ASP page to display thumbnails and related information. The specific design is as follows:
Image:
Image Format:
Image Size:
Image Size:
Clicks:
Next, we get the absolute path of the image. The Code is as follows:'//
Class boxinfoimg
'Usage of the transmission class
'Image upload and upload information acquisition class
'Usage:
'Dim imgup
'Set imgup = new boxinfoimg
[Source: feitec.com content, reprinted, please specify the source]
'Property:'Imgup. width'
1. Function for obtaining image size getImageSize
Copy codeThe Code is as follows: function getImageSize (imageEl ){
Var I = new Image (); // create an Image object
I. src = imageEl. src; // assign the src attribute of the image to the src
PHP image processing tutorial (13 ). PHP image processing Getting Started Tutorial This php image generation tutorial is a php Tutorial from generating a simple image to generating a complex image, in a simple way, there are 12 image generation
This article mainly introduces php's image processing implementation code, including scaling, cropping, scaling, flip, rotating, transparent, sharpening, and other image operations. For more information, see
I. create image
This article mainly introduces the php + js Upload Avatar interface without redirection. iframe is used in this example. if you need it, you can refer to the upload avatar. There are many methods to skip the interface, I am using an iframe. The
PHP allows you to generate various App Logo sizes and phpapp logo sizes in batches. PHP allows you to generate various App Logo sizes in batches. PHPGD is used for phpapp logo sizes. it is easy to use and can be tailored and downloaded in one click.
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.