Example 1
The code is as follows
Copy Code
Header ("Content-type:image/png"); /* Notification browser, to output the image * *$im = Imagecreate (400, 300); /* Define the size of the image * *$gray = Imagecolorallocate ($im, 235, 235, 235);$pink = Imagecolorallocate ($im, 255, 128, 255);$fontfile = "Simkai.ttf";/* $fontfile The path of the font, depending on the operating system, can be Simhei.ttf (bold), Simkai. TTF (italics), Simfang. TTF (imitation), SimSun. TTC (XX
In the front we have a preliminary understanding of the Word 2007 document to insert the Watermark method of setting, mainly through the watermark style to choose from. If you do not find the watermark you want in the style, then you can customize the watermark, can be a text water
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 function code (supports pictures and text)
/*
* Function: php image watermark (watermarks support images or text)
* Parameters:
* $ GroundImage: specifies the background image to be Watermark. Currently, only GIF, JPG, and PNG formats are supported;
* $ WaterPos
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
Adding watermarks to Images Using ASP requires components... common applications include aspjpeg software and wsImage software developed by the Chinese people. You can search and download the two software online. We recommend that you use the wsImage developed by the Chinese people. After all, it is a Chinese version and easy to operate.
How to register Components:Enter "regsvr32 [Dll path]" at the command prompt.Adding a watermark to an image is not
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.
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
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
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
Today encountered a demand for the upload map covered with watermarks, on the internet to find a long time is set in the specified location watermark, the following code is I find the code online, and then transformed into. Let's look at the effect chart first.
Here's how to implement it:The first step: the use of PS or beauty map software design watermark images, such as:
Step two: Put the following
For how to add watermark on the picture is a difficult problem that many technical personnel encounter, that everyone has seen the public number and some other technology platform can realize this function, but how to realize the source code, but there is no clue, then today to introduce you about Kindeditor upload pictures and watermark method, After reading, I believe that the technical staff will know.Fi
PHP thumbnails and image watermark creation,
1. Start
Thumbnails are often used in the process of uploading images to websites. Here I wrote an Image class for Image processing, which can generate thumbnails and add watermarks.
2. How to generate a thumbnail
The key to generating a thumbnail is how to calculate the zoom ratio.
Here, based on several common changes in image proportional scaling and width height, I come up with an algorithm for calculat
ErrorMsg;} /*** parameter settings * @author sanshi0815* @param string$font font file with a directory text watermark using * @param string$watermark watermark text or image address * @param string$ Srcfile Original Image Address * @param string$dstfile generate new picture address * @return NULL no return value */public function set ($font, $
PHP implementation of a picture to add a watermark effect,
PHP implementation of a picture to add watermark effect
Let's take a look at a support to add a watermark to a picture in two ways: Picture and text. Image support Gif,png,jpg Three formats, watermark image support PNG and GIF
function Setwater ($IMGSRC, $M
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.