OSS(阿里)上的图片添加水印

it2023-03-18  124

OSS的图片添加水印

1.将UI给你的水印图上传至OSS服务器上; 2.拿到图片路径,将上传后图片的后缀加上"?x-oss-process=image/resize,P_60"转为base64格式; --------P是水印的大小 3.在需要加水印的图片路径后面加上"?x-oss-process=image/resize,w_400/watermark,image_[水印的base64编码],t_50,g_se,x_20,y_50".---------后面是一些参数;

阿里oss文档:https://help.aliyun.com/document_detail/44957.html?spm=a2c4g.11186623.6.746.76052603Fwj2O8#title-fkf-vmt-r83 base64加密链接:http://tool.chinaz.com/Tools/Base64.aspx

最新回复(0)