Background:wrote a test program to read the local image, and to make a watermark image for it. In the use of the process will always encounter: Javax.imageio.IIOException:Can ' t read input file! error, the first thought is that the picture path
Php adds an image watermark to the uploaded image. I believe everyone knows how to use PHP to add a text watermark to an image. But what if the watermark effect is an image? What should I do? Don't worry. we will break it down later. I also recently
$ Ico_pic is the watermark image you want to add a watermark to the image. Other parameters are described in detail, if you look for such code, you can download and save it as a PHP file, and then use the call method described later to call the
There are many ways to add watermarks to images in php. These functions are based on the GD library in php. If you do not have an account, you cannot use the watermark function.
The imagecopymerge () function is used to copy and merge part of an
This article to the students about the use of CKEditor upload file renaming and watermark configuration, there is a need to understand the students can enter the reference.
First: I want the uploaded files to organize the folders according to the
/*
* Function: PHP image watermark (watermark supports picture or text)
Parameters
* $groundimage background image, that is, need to add a watermark image, temporarily only support gif,jpg,png format;
* $waterpos watermark
Add watermark to the picture is a common and very useful function of PHP program, let me give you a detailed introduction to the PHP PNG transparent background Watermark program code bar.
The code is as follows
Copy Code
Php image application-generate an image with a watermark text-generate an image with a watermark icon-generate a thumbnail (// For the annotation content, without affecting File Execution ),//// // Start of the watermark text function ///////////////
PHP Chinese text watermark garbled, beg enlighten
This post was last edited by zhangrun1 on 2012-12-03 11:43:19
Several encoding settings:
File:
Head:
Code:
Results:
Detailed code:
Default Examples
/** Function: PHP image watermark
Add a watermark to a picture
Copy Code code as follows:
Dim Jpeg ' '//Declaration variable
Set Jpeg = Server.CreateObject ("persits.jpeg") '//Calling Component
Jpeg.open Server.MapPath ("AAA"). JPG ")"//Source Picture location
////////////////Defining the watermark Text function begins//////////////////function Watertext ($i, $t = ' All rights reserved ', $s =20, $c = ' white ', $p =9) {$img = Imagecreatefromjpeg ($i); Imagecreatefromjpeg-creates a new image from a file
Today encountered a demand for the upload map covered with watermarks, on the internet to find a long time is set in the specified location watermark, the following code is I find the code online, and then transformed into. Let's look at the effect
The main reason is that the original type of the uploaded image is GIF, so you must first map the original image, and then save the bitmap.
/// /// Add a watermark to the image/// /// original file /// watermark file /// watermark result file
Part of the content is taken from the Internet. Select the best part and add it to your own practice. record it for future generations and convenience!
1. Generate JPG Images
Response. setcontenttype ("image/JPEG ");Int width = 32, Height =
This is my watermark http://www.eoeandroid.com/thread-206223-1-1.html.This is what I force on GPSHttp://www.eoeandroid.com/thread-206003-1-1.html
This was sent when I got off work today.
Http://www.eoeandroid.com/thread-206311-1-1.html
Source
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.