Added the Image Upload watermark function (php Code) to the Kindeditor editor ),
KindEditor is an open-source online HTML editor. developers can use KindEditor to replace the traditional multi-line text input box (textarea) with a visualized rich text input box. It can be seamlessly integrated with Java,. NET, PHP, ASP and other programs, and is suitable for use in Internet applications such as CMS, mall, forum, blog, Wiki, and email.Main features:
Fa
Word watermark is widely used in the production of documents, many friends in the production of Word documents, in order to make the document more beautiful, like to add any pictures and text as a background picture, which we call "watermark." Not only that, we can also set the document background to any color or a variety of exquisite style, a beautiful article with a good background style, so that gives a
PHP image processing, PHP image text watermark, PHP how to add a watermark, PHP watermark function, PHP generate a watermark
Today, I will share with you the source code of the function that is frequently used in PHP website development to add watermarks to images. it was written by the PHP blog and tested in person, y
/*
* 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 position, there are 10 kinds of states, 0 is a random position;
* For th
Many friends have prepared a lot of beautiful pictures, posted online, and watched their work stolen by others, how to do can make your picture is very good use, look at the following textbook
1: Open your watermark file, as shown below
2: Copy watermark (How to copy, look at the figure below, CTRL + C (shortcut key) copy)
Note:1: Look at the level of the layers panel, you are not selected to the l
The realization of watermark function is mainly depend on these function function operation
1.imagecreatefromjpeg//Open JPG picture 2.imagecreatefromgif//Open GIF picture3.imagecreatefrompng//Open PNG picture4.imagecreatefromwbmp//Open wbmp picture (less use)5.getimagesize//Get picture size information6.imagecopymerge//Integrate multiple images (main function to add watermarks)7.imagejpeg//save JPG Picture8.imagegif//Save GIF picture9.imagepng//Save
The code is as follows
Copy Code
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 _im =imagecreatefromgif ($DST); Case 2: $DST _im =imagecreatefromjpeg ($DST); Case 3: $DST _im =imagecreatefrompng ($DST); Case 6: $DST _im =imagecreatefromwbmp ($DST); Default Die ("Unsupported file type 1"); exit; }
Using System;Using System.IO;Using System.Collections;Using System.Drawing;Using System.Drawing.Drawing2D;Using System.Drawing.Imaging; Namespace Imag_writer{Type of watermarkpublic enum Watermarktype{Text watermarkTextmark,Picture watermarkImageMark//Temporarily only add text watermark}; The location of the watermarkpublic enum Watermarkposition{Upper left cornerWmp_left_top,Lower left cornerWmp_left_bottom,Top right cornerWmp_right_top,Lower right c
Like PDFs, in Word, watermarks are divided into image watermarks and text watermarks, and adding a picture watermark to a document can make the document more beautiful and appealing. A text watermark protects the document by reminding others that the document is copyrighted and cannot be copied at will. Before I shared how to add a watermark to the PDF, someone a
1, the concept of watermark
Watermark is a mechanism for measuring the progress of event time, which is a hidden attribute of the data itself. Typically, data based on event time contains a timestamp, such as 1472693399700 (2016-09-01 09:29:59.700), and the watermark time of this data may be:
Watermark (1472693399700)
1. Add watermarks to images
CopyCode The Code is as follows: Dim jpeg "" // declare the variable
Set JPEG = server. Createobject ("persits. JPEG") "// call the component
JPEG. Open Server. mappath ("AAA. jpg") "// source Image Location
JPEG. Canvas. Font. Color = h000000 "// watermark font color
JPEG. Canvas. Font. Family = "" "// watermark font
JPEG. Canvas. Font. size = 14 "//
Last done a picture watermark, the effect is very poor, no way to make the picture background transparent, with the background transparent GIF will automatically fill into white. With the function of removing a certain color, the picture color is always impure, the effect that comes out is stained dot. Today brainwave, put these two together, with the background transparent GIF, and extract watermark backgr
ASP to add watermark to the image is the need for components ... Commonly used with AspJpeg software and the Chinese developed their own wsimage software, you can search the Internet to download these two software, recommended the use of our own development of the Chinese wsimage, after all, is the Chinese version, easy to operate.
ways to register a component:
At the command prompt, enter "regsvr32 [DLL path]".
Image add
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 position
Jpeg.Canvas.Font.Color = h000000 ""//Watermark Font Color
Jpeg.Canvas.Font.Family = "Song Body" ""//Watermark Font
Recently began to learn the image processing knowledge, think of the previous has done to the picture to add text watermark, however, was still in the former company, time is also very long, this time when the review.
The watermark here is to add a text tag inside the picture, which is usually used to mark the copyright. To improve reusability, I encapsulated the implementation of this feature into a class.
word2013 How to remove a watermark? The Word document we find on the internet will have a watermark, how to remove it? The following small series to teach everyone word2013 to remove the watermark of the tutorial, you will encounter a watermark of Word documents, you can easily remove, whether it is a text
Today blue1000.com is sharing a tutorial on how to use Word to add a watermark to a file picture. To facilitate those original authors for their own articles and pictures stamped with their own imprint. Children's shoes in need, come and leave your paw print!
Click on the menu bar "format"-"Background"-"watermark", pop-up "watermark" Settings window, first selec
Add a watermark (canvas + drag) to the image in the blog garden ),Preface I want to add a watermark to some of my pictures, so I am playing with such a thing.This function does not take compatibility into consideration (too lazy). It is only tested in Chrome. If you do not pass the test in IE Firefox, do not vomit.Because the download attribute is applied, you don't have to worry about IE or anything. If yo
Image watermark in PHP There are many ways to achieve, he these features are based on the GD library in PHP, if there is no opening of the GD library is not allowed to use the watermark function.
The Imagecopymerge () function is used to copy and merge part of the image, which returns TRUE successfully, otherwise FALSE.
GD Library support for PHP open under Windows
Locate php.ini, open the content, find:
;
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.