This article mainly for you to introduce the PHP generated random watermark image of the relevant data, with a certain reference value, interested in the small partners can refer to the PHP-based GD Graphics library, generate a picture themselves. Only the first knowledge of GD library, example learning. First, the layout of the needs of the site to use a similar to the Class Network course list style, each course is a banner map, the following is the
Support text watermark, image watermark
Support for watermark location random or fixed (ix Gongge)
Watermark Transparency Settings (both image watermark and text watermark support)
font, color, and size settings for text watermark
New definition of photo "watermark"
What is a watermark? The traditional watermark is usually the copyright information, the author information or the anti-theft map information in the picture, the producer and the application are usually specialized groups.
Watermark Camera gives a new definition of "
ObjectiveJava development often encountered in the processing of images, JDK also provides the corresponding tool classes, but it is cumbersome to deal with, Thumbnailator is a good image processing of open-source Java class Library, processing effect is far better than the Java API, The process is simplified from the classes in which the API provides existing image files and image objects, and two or three lines of code can generate processed pictures from existing images and allow fine-tuning
A super powerful image watermark class. In the afternoon, I wrote a watermark class for the image. this class adds a text watermark to the image, adds an image watermark, and implements the transparency function, I wrote a class for adding watermarks to images for users to learn and do nothing in the afternoon. this cl
Php image and Chinese watermark implementation code sharing Example 1
The code is as follows:
Header ("Content-type: image/png");/* notify the browser to output the image */
$ Im = imagecreate (400,300);/* define the image size */
$ Gray = ImageColorAllocate ($ im, 235,235,235 );
$ Pink = ImageColorAllocate ($ im, 255,128,255 );
$ Fontfile = "simkai. ttf ";
/* $ Fontfile font path, depending on the operating system, can be simhei. ttf (), SIMKAI. TTF
Php code for adding a Chinese watermark to an image
Header ("Content-type: image/png");/* notify the browser to output the image */
$ Im = imagecreate (400,300);/* define the image size */
$ Gray = ImageColorAllocate ($ im, 235,235,235 );
$ Pink = ImageColorAllocate ($ im, 255,128,255 );
$ Fontfile = "simkai. ttf ";
/* $ Fontfile font path, depending on the operating system, can be simhei. ttf
ASP component AspJpeg (watermark) generate thumbnails and other usage methodsFont: [Increase decrease] Type: Reprint time: 2012-12-17 I want to commentAspJpeg is a fairly powerful image processing component that makes it easy to make thumbnails of images and watermark images. Here is a brief introduction to the use of methods, the need for friends to understand the nextfirst, to add a
Support text watermark, image watermark support watermark location random or fixed (nine Gongge) Watermark Transparency settings (image watermark and text watermark are supported) text waterma
Applicable scenario:
1, photography enthusiasts: Every time after the photo back, the pictures need post-processing, and many of them are repetitive, such as: batch renaming, mass reduction of picture size, bulk Add notes information, batch add watermark, batch rotation photos, bulk delete exif parameter information a
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 1Copy codeThe code is as follows:
Header ("Content-type: image/png");/* notify the browser to output the image */$ Im = imagecreate (400,300);/* define the image size */$ Gray = ImageColorAllocate ($ im, 235,
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
The code is as follows:
Header ("Content-type: image/png");/* notify the browser to output the image */
$ Im = imagecreate (400,300);/* define the image size */
$ Gray = ImageColorAllocate ($ im, 235,235,
1, automatic or batch processing, the list of 6 "Automatic action scheme", we through the "file" drop-down menu to see "Automatic" and "batch processing."
The first and sixth scenarios will not produce watermarks and text labels.
The second "pattern Border + watermark" will leave "Shadow Magic Hand" logo waterma
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
Original image$DST = "/upload/20120914/20120914040740-0.jpg"; Note that the picture path should be correctGet the original picture information$DST _info = getimage
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
The code is as follows:
Header ("Content-type: image/png");/* notify the browser to output the image */$ Im = imagecreate (400,300);/* define the image size */$ Gray = ImageColorAllocate ($ im, 235,235,
PHP image watermark code. Supports text and image watermarks. supports random watermark positions or fixed watermark transparency settings (image and text watermarks are supported). font and color of text watermarks, text watermarks, and image watermarks are supported.
Supports random or fixed watermark positions (nine
Text: Using JavaScript to implement dynamic watermark of Web pages1. Fundamentals
After the page is loaded, create a page element div from JavaScript and create a text node in the DIV element to display the watermark content
Set the DIV element style, set its zindex to a higher value, and set the transparency to achieve the watermark effect floating
Support text watermark, image watermark
Watermark is supported at random or fixed position (nine Sudoku)
Watermark Transparency Settings (both image watermark and text watermark are supported)
font, color, size settings for text w
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 date
Please modify the: config.php file under the editoreditorfilemanagerconnectorsphp folder
Find the following content:
The code is as follows
Copy Code
Path to user files relati
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.