This article illustrates the method of thinkphp watermark to fix PNG transparent watermark and increase the quality of JPEG image. Share to everyone for your reference. The implementation methods are as follows:
TP comes with the picture class, has the function which adds the watermark to the picture.Here the perfect:
TP comes with an image class and can be used to add watermarks to an image.Here we have improved:1. PNG watermark transparency2. Adjust the watermark quality (only in JPG format)The Code is as follows:Red indicates the original systemGreen indicates the modified/**+ --------------------* Add a watermark to an
Nonsense not to say, paste code:
Copy CodeThe code is as follows:
/************************************
Function: Watermark ($bigimg, $smallimg, $coord = 1)
Role: Adding watermarks
Parameters:
$bigimg must be selected. Big picture--a picture to add a watermark
$smallimg must be selected. Small picture
$coord is optional. The position of the watermark in the lar
Sometimes upload images need to add a watermark to the site, watermark can be divided into text watermark and image watermark, the following implementation of these two kinds of watermark text
This article PHP picture operation package class inside four kinds of methods, text watermark (Imagettftext ()), Picture Watermark (Imagecopymerge ()), picture compression, picture clipping (imagecopyresampled ()), the rest of the usual GD function will not be described.
Directly on the code:
Class Image{Private $info;Private $
Add watermark information to the image in Asp.net and save it as Jpg. asp.net watermark
Using System. Drawing; using System. IO; using System. Drawing. Imaging; private void AddTextToImg (string fileName, string text) {if (! File. Exists (MapPath (fileName) {throw new FileNotFoundException ("The file don't exist! ");} If (text = string. empty) {return;} // you ne
']); } //Destroying pictures Public function__destruct () {Imagedestroy ($this-res); } /** * @desc Add text watermark * @param $content string literal * @param $fonturl string Font path * @param $fontsize int Font size * @param $fontcolor array Set color and transparency * @param $local array watermark coordinates * @param $fontangle int font rotation angle*/ P
public static void Main (string[] args){Createmark ("E://image//a.gif", "e://image//b.jpg");}/*** Add a watermark picture and text to the picture* @param filePath Original picture file path* @param watermark Watermark Image File p
Adding a watermark to a good image makes us uncomfortable. if there is no way to remove the watermark using the PS tool, we will share with you the following methods to remove text by using the imitation stamp tool, repair tool, and repair brush tool, if you are interested, you can refer to adding a watermark to a good
~ ~ ~), create a new action.
5
As shown in figure, enter the name of the new action "Shrink + watermark". Click "Record" to complete. Action starts recording, button turns red.
6
Below begin to modify the image size, color, etc. (according to your own needs). The title bar >> images can be found.
7
Continue adding watermarks. Locate the Horizontal type
PHP image processing function class (watermark image, thumbnail) [about proportional compression and cropping compression]
The following is a simple image processing class, including watermarks and thumbnails.However, there are two ways to generate a thumbnail: one is to compress the
Add Chinese and image watermark codes for php images. $ 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 this type of code, you can download and sav
Today, many special small series to introduce the use of light and shadow magic hand, the image to remove the watermark method, hope to help everyone.
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."
To teach you to use light and shadow magic hand watermark, and bulk watermark, a simple few steps can let you learn
First, start the Shadow Magic Hand, open a picture we want to add a watermark.
Second, open the picture and click on the top right corner of the "watermark" icon.
Third, after c
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.