To implement Linux under the Shell script batch for the specified folder to add a watermark to the picture, first need to install ImageMagick:
Install on CentOS:
Yum Install Imagemagick-y
Install on Debian:
Apt-get Install Imagemagick-y
Script:
#!/bin/bash
for all in/to be processed the picture directory/*{.jpg,.gif}
s= ' du-k $each | awk ' {print '} '
if [$s-gt]; then
Add watermark to the picture is a lot of web site will do things, the following code only supports the text watermark Oh, now only support English, if you want this program to support Chinese characters will $font=\ ' verdana.ttf\ '; Calling a Chinese font is OK.
PHP Tutorial to add text
C # Add watermark Effect
The followingCodeAdding a text watermark and an image watermark cannot coexist (the following is written together for ease of display)
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> Private Void Btn_upload_click ( Object
The example of this article for everyone to share the TextBox and PasswordBox watermark method for your reference, the specific contents are as follows
TextBox plus watermark
TextBox plus watermark, need a visualbrush and trigger to verify that the text is empty, set the background in the empty brush can realize the waterma
This article mainly introduces PHP uses the Magickwand module operation picture to add the watermark method, the interest friend's reference, hoped to be helpful to everybody.
In the use of PHP programming, many times need to upload images and watermark, to determine the copyright and provenance of the image. However, in general, the location of the
The example of this article describes the ASP.net inheritance IHttpHandler interface implementation to the Web site image add watermark function. Share to everyone for your reference, specific as follows:
First show the picture effect:
1. Add the class file under App_Code, named Imagesy file as follows
public class Imagesy:ihttphandler {public Imagesy ()
1PHP2 /**3 Add a watermark to a background image (location random)4 @param string $filename the background image to which you want to add a watermark5 @param string $water watermark picture6 */7 functionWatermark$filename,$water){8 //Gets the height and width of the background picture9 List(
Describe how to add a watermark to the aspjpge component in detail.
Program code '------------ Add a watermark for the image --------
Sub addwatermark (imagename)
'Defines variables.
Dim JPEG
Set JPEG = server. Createobject ('persits. JPEG ')' creates an object.JPEG. Open trim (server. mappath (imagename) 'Image Lo
C # Image Processing Tool class, you can compress JPG images, images automatically generated thumbnails, add watermark to the image, and so on, return to the HD thumbnail, get the best picture scaling size, and get the type of picture, such as the class code as follows:
View Sourceprint?001using System;
002using System.Collections.Generic;
003using System.Linq;
004using System.Text;
005using System.IO;
The first step: Add a Watermark box to the Picture Upload dialog box to find:Satics/js/ckeditor/ckeditor.js line 17,554th (need to format, I use NetBeans) to change tofunction D () {W.$.open ();if (B.iscustomdomain ()) W.$.domain=document.domain;var e= ';if (x.size) e=x.size-(c?7:0);var f=u.frameid+ ' _input ';W.$.write ([' ' ' W.$.close ();for (Var g=0; g};Added a red sectionStep Two: Modify phpcms/libs/cl
. Response.ContentType = "Image/jpg";
Writes the request file to the output cache
#region Get XML configuration information
DataSet dsconfing = new DataSet ();
String Watermarkconfigpath = context. Server.MapPath ("~/config/watermarkconfig.xml");
if (System.IO.File.Exists (Watermarkconfigpath))
Dsconfing.readxml (Watermarkconfigpath);
Else
{
To add a default watermark configuration
}
DataRow drco
asp.net in the following code, the text watermark and add the image watermark code can not coexist, in order to facilitate the display before writing in a piece of
private void Btn_upload_click (object sender, System.EventArgs e)
{
if (UploadFile.PostedFile.FileName.Trim ()!= "")
{
Uploading files
string extension = Path.getextension (UploadFile.PostedFile.FileNa
We sometimes need to add a copyright watermark to a picture on our site, and the. NET Graphics class can be easily implemented.
Effect Diagram: (the top of the picture is the line that we added the copyright watermark)
Implementation code:
/**////Generate a picture with a copyright watermark
private void Makewate
If you want to use PHP to add background tile watermark effect to the image, you must use a PHP plug-in to the instance, that is, using Imagick, he can add background tile watermark Effect Oh, below we provide an example code.
If you want to use PHP tutorial to add backgroun
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 "waterm
php to add a watermark for the picture, apply to the png/jpg/gif format, you need friends can refer to the following Code as follows: lt;?php/** nbsp;* picture watermark (for png/jpg/gif format) nbsp;*nbsp; nbsp;* @author flynetcn nbsp;* nbsp;* @param $srcImg Original picture nbsp;* @param $waterImg watermark picture
First, open the Photoshop application, open, and then you need to add a watermark of the picture material dragged to the inside, this picture is to learn worry free to find a picture, please you as a reference can be. As shown in the figure:
Step two, drag after, if you need to add a picture watermark, drag the
PHP Object-oriented and process-oriented two methods to add a text watermark to the picture,
Most PHP programmers now use a process-oriented approach because parsing the Web page itself is very "procedural" (from one label to another). Embedding the Process code in HTML is straightforward and natural, so PHP programmers typically use this approach.
If you're new to PHP, writing code in a process-oriented s
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.