微信小程序实用工具。

自律打卡100天

自律打卡100天,每日打卡习惯养成工具,支持早起打卡、阅读打卡、运动打卡、学习打卡、体重打卡等每日签到,自动生成打卡记录,助你坚持到底,养成好习惯,做更好的自己。

小程序码

照片压缩尺寸裁剪小助手

在线图片处理小程序。支持图片压缩、裁剪、旋转、拼接、加水印、格式转换和尺寸修改,还能一键制作九宫格裁剪图,快速完成日常照片编辑。

小程序码
文章来源: 100素材网 更新时间: 2014-08-06 10:02:34
图片添加水印 图片添加水印文字 php添加水印

我们经常看见好多网站上的图片有水印,例如新浪、腾讯上的一些图片上写着版权所有。这就是水印。下面我用php代码简单制作水印,希望对大家有所帮助


<?php
// Load the stamp and the photo to apply the watermark to
$stamp = imagecreatefrompng('http://www.100sucai.com/img/qq.png');
$im = imagecreatefromjpeg('http://www.100sucai.com/img/qq.jpg');

// Set the margins for the stamp and get the height/width of the stamp image
$marge_right = 10;
$marge_bottom = 10;
$sx = imagesx($stamp);
$sy = imagesy($stamp);

// Copy the stamp image onto our photo using the margin offsets and the photo 
// width to calculate positioning of the stamp. 
imagecopy($im, $stamp, imagesx($im) - $sx - $marge_right, imagesy($im) - $sy - $marge_bottom, 0, 0, imagesx($stamp), imagesy($stamp));

// Output and free memory
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
?>


除非特别声明,此稿为原稿转载请注明原文链接
原文地址: http://www.www100sucai.com/code/1253.html

浏览次数次
上一篇文章: php Smarty配置方法

标签分类