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
This class is very powerful and detailed! I hope you will like it and give some suggestions on text and image watermarks.
Supports random or fixed watermark positions (nine cells)
Watermark transparency settings (image watermarks and text watermarks are supported)
Font, color, and size settings of text watermarks
Transparency of the image watermark background
T
AspJpeg is a persits-produced shareware, the probationary period is 30 days, you can download here: Http://www.persits.com/aspjpeg.exe. The latest version number is 1.3.
AspJpeg is a very powerful image processing component, with which you can easily make thumbnails of pictures and add watermarks to images. Here is a brief description of how to use it:
You will first perform the downloaded EXE file and install the component
1. Make thumbnails for pictures
Dim Jpeg,path
Set Jpeg = Server.CreateO
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
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,
The method used here is to add a watermark During User Access (without damaging the original image, but affecting server performance ).
(1) Use the general processing program bookcover. asxh
Using system;Using system. Web;Using system. drawing;Using system. IO;
Public class bookcover: ihttphandler {// Cover folder pathPrivate const string coversaddr = "~ /Images/bookcovers /";// Digital watermark pathPrivat
ArticleDirectory
Control and cueinfo
About the ComboBox control
Apply the watermark effect to the control.
It took some time to package a simple sendmessage and create a component for watermark management. Let's take a look at it first.
These two classes are the main types for implementing the watermark manager, na
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
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
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 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.