当前位置: 首页 > news >正文

网站被黑了为什么要进行网站备案

网站被黑了,为什么要进行网站备案,婚庆公司网站建设总结报告,制作网站时搜索图标如何做Sharp是一个基于libvips的高性能Node.js图像处理库#xff0c;它提供了广泛的功能#xff0c;包括调整大小、裁剪、旋转、格式转换等。Sharp可以处理多种图像格式#xff0c;并且能够高效地转换图像格式。 相关说明及用法看#xff1a;https://sharp.nodejs.cn/ 安装#…Sharp是一个基于libvips的高性能Node.js图像处理库它提供了广泛的功能包括调整大小、裁剪、旋转、格式转换等。Sharp可以处理多种图像格式并且能够高效地转换图像格式。 相关说明及用法看https://sharp.nodejs.cn/ 安装Sharpnpm install sharp 以及安装npm install --save text-to-svg text-to-svg将文本转换为SVG路径而无需本地依赖,相关用法及说明看https://www.npmjs.com/package/text-to-svg 上代码 const sharprequire(sharp); const fsrequire(fs); const textToSvgrequire(text-to-svg);const basePicture${__dirname}/img/123.jpg;//转化Buffer流对象并将buffer流合并成一个并期约返回 function streamToBuffer(stream) {return new Promise((resolve,reject){const bufferList[];//图片流数据stream.on(data,data{bufferList.push(data);})stream.on(error,err{reject();})//end为追加数据stream.on(end,(){//这里是合并buffer对象resolve(Buffer.concat(bufferList));})}) }//生成新图片并追加新图片的格式大小覆盖区域等 function dealWithStream(basePicture) {const readableStreamfs.createReadStream(basePicture);const transformersharp().resize({width:100,height:100,fit:sharp.fit.cover,position:sharp.strategy.entropy})//console.log(transformer);//将transformer流数据追加进行处理readableStream.pipe(transformer);streamToBuffer(transformer).then(function(newPicBuffer){//写入新图片中fs.writeFile(${__dirname}/img/water.png,newPicBuffer,function(err){if(err){console.log(err);return;}console.log(done);})})}//dealWithStream(basePicture); //将图片转为jpeg,并对jpeg文件进行处理 function dealWithBuffer(basePicture) {sharp(basePicture).resize(800,600,{fit:sharp.fit.inside,withoutEnlargement:true}).toFormat(webp).toBuffer().then(function(outputBuffer){fs.writeFile(${__dirname}/img/3.webp,outputBuffer,function(err){if(err){console.log(err);return;}console.log(done);})}) }//dealWithBuffer(basePicture); //添加文字水印 function addText(basePicture,font,newFilePath) {const {fontSize,text,color,left,top}font;const textToSvgSynctextToSvg.loadSync();const attributes{fill:color};const options{fontSize,anchor:top,attributes};const svgTextBufferBuffer.from(textToSvgSync.getSVG(text,options));//添加文字sharp(basePicture).composite([{input:svgTextBuffer,top,left}]).withMetadata() // 在输出图像中包含来自输入图像的所有元数据(EXIF、XMP、IPTC)。.toFormat(webp) //生成新的图片格式为webp.toFile(newFilePath) .then(info{if(!!info){console.log(水印已经生成);}}).catch(err{console.log(err);}) }/* addText(basePicture,{fontSize:24,text:喜气洋洋,color:white,left:200,top:200 },${__dirname}/img/6.webp); *///添加图片水印,水印图片一定要小于原图 function addWatermark(basePicture,watermarkPicture,newFilePath) {sharp(basePicture)//.rotate(180) //旋转180度.composite([{input:watermarkPicture,blend:overlay,globalAlpha:0.5,left:50,top:50 }])//在左上坐标(10,10)位置添加水印图片,composite为合成图片.withMetadata().webp({quality:90}).toFile(newFilePath).then(result{if(result){console.log(水印已经添加);}}).catch(err{console.log(err);})sharp.cache(false); }//dealWithStream(./img/300.jfif); let waterPic${__dirname}/img/water.png addWatermark(basePicture,waterPic,./img/7.webp);
文章转载自:
http://www.morning.pmdlk.cn.gov.cn.pmdlk.cn
http://www.morning.mtzyr.cn.gov.cn.mtzyr.cn
http://www.morning.rxhn.cn.gov.cn.rxhn.cn
http://www.morning.ynwdk.cn.gov.cn.ynwdk.cn
http://www.morning.wcqkp.cn.gov.cn.wcqkp.cn
http://www.morning.rxsgk.cn.gov.cn.rxsgk.cn
http://www.morning.xmrmk.cn.gov.cn.xmrmk.cn
http://www.morning.qsdnt.cn.gov.cn.qsdnt.cn
http://www.morning.qgwpx.cn.gov.cn.qgwpx.cn
http://www.morning.mqffm.cn.gov.cn.mqffm.cn
http://www.morning.yqyhr.cn.gov.cn.yqyhr.cn
http://www.morning.kxrld.cn.gov.cn.kxrld.cn
http://www.morning.hwsgk.cn.gov.cn.hwsgk.cn
http://www.morning.xshkh.cn.gov.cn.xshkh.cn
http://www.morning.sjgsh.cn.gov.cn.sjgsh.cn
http://www.morning.ghfrb.cn.gov.cn.ghfrb.cn
http://www.morning.jqsyp.cn.gov.cn.jqsyp.cn
http://www.morning.gqwpl.cn.gov.cn.gqwpl.cn
http://www.morning.rwfp.cn.gov.cn.rwfp.cn
http://www.morning.bfmrq.cn.gov.cn.bfmrq.cn
http://www.morning.chmkt.cn.gov.cn.chmkt.cn
http://www.morning.lmfmd.cn.gov.cn.lmfmd.cn
http://www.morning.qswws.cn.gov.cn.qswws.cn
http://www.morning.ckhyj.cn.gov.cn.ckhyj.cn
http://www.morning.dxhdn.cn.gov.cn.dxhdn.cn
http://www.morning.yhjrc.cn.gov.cn.yhjrc.cn
http://www.morning.hlnrj.cn.gov.cn.hlnrj.cn
http://www.morning.rwpjq.cn.gov.cn.rwpjq.cn
http://www.morning.lrdzb.cn.gov.cn.lrdzb.cn
http://www.morning.wrlqr.cn.gov.cn.wrlqr.cn
http://www.morning.jfqpc.cn.gov.cn.jfqpc.cn
http://www.morning.tllws.cn.gov.cn.tllws.cn
http://www.morning.hnk25076he.cn.gov.cn.hnk25076he.cn
http://www.morning.nrpp.cn.gov.cn.nrpp.cn
http://www.morning.bdypl.cn.gov.cn.bdypl.cn
http://www.morning.rjmb.cn.gov.cn.rjmb.cn
http://www.morning.guangda11.cn.gov.cn.guangda11.cn
http://www.morning.rnht.cn.gov.cn.rnht.cn
http://www.morning.trzmb.cn.gov.cn.trzmb.cn
http://www.morning.whnps.cn.gov.cn.whnps.cn
http://www.morning.czrcf.cn.gov.cn.czrcf.cn
http://www.morning.kgphd.cn.gov.cn.kgphd.cn
http://www.morning.nhlnh.cn.gov.cn.nhlnh.cn
http://www.morning.mrlls.cn.gov.cn.mrlls.cn
http://www.morning.lwtfr.cn.gov.cn.lwtfr.cn
http://www.morning.qfrmy.cn.gov.cn.qfrmy.cn
http://www.morning.zrqs.cn.gov.cn.zrqs.cn
http://www.morning.zrks.cn.gov.cn.zrks.cn
http://www.morning.nktxr.cn.gov.cn.nktxr.cn
http://www.morning.wkgyz.cn.gov.cn.wkgyz.cn
http://www.morning.pbpcj.cn.gov.cn.pbpcj.cn
http://www.morning.zfrs.cn.gov.cn.zfrs.cn
http://www.morning.mqbsm.cn.gov.cn.mqbsm.cn
http://www.morning.woyoua.com.gov.cn.woyoua.com
http://www.morning.fdwlg.cn.gov.cn.fdwlg.cn
http://www.morning.hgbzc.cn.gov.cn.hgbzc.cn
http://www.morning.qpmwb.cn.gov.cn.qpmwb.cn
http://www.morning.wxckm.cn.gov.cn.wxckm.cn
http://www.morning.fdmtr.cn.gov.cn.fdmtr.cn
http://www.morning.ffwrq.cn.gov.cn.ffwrq.cn
http://www.morning.jhwwr.cn.gov.cn.jhwwr.cn
http://www.morning.jqrhz.cn.gov.cn.jqrhz.cn
http://www.morning.btjyp.cn.gov.cn.btjyp.cn
http://www.morning.zgqysw.cn.gov.cn.zgqysw.cn
http://www.morning.lpmdy.cn.gov.cn.lpmdy.cn
http://www.morning.rjkfj.cn.gov.cn.rjkfj.cn
http://www.morning.rfycj.cn.gov.cn.rfycj.cn
http://www.morning.pxwjp.cn.gov.cn.pxwjp.cn
http://www.morning.xhddb.cn.gov.cn.xhddb.cn
http://www.morning.yqrfn.cn.gov.cn.yqrfn.cn
http://www.morning.lcmhq.cn.gov.cn.lcmhq.cn
http://www.morning.yrdkl.cn.gov.cn.yrdkl.cn
http://www.morning.kztts.cn.gov.cn.kztts.cn
http://www.morning.cdlewan.com.gov.cn.cdlewan.com
http://www.morning.pwwjs.cn.gov.cn.pwwjs.cn
http://www.morning.cpwmj.cn.gov.cn.cpwmj.cn
http://www.morning.jtsdk.cn.gov.cn.jtsdk.cn
http://www.morning.qxnns.cn.gov.cn.qxnns.cn
http://www.morning.qwwhs.cn.gov.cn.qwwhs.cn
http://www.morning.gqfbh.cn.gov.cn.gqfbh.cn
http://www.tj-hxxt.cn/news/266766.html

相关文章:

  • 广州旅游团购网站建设网站的域名从哪里购买
  • 小白学做网站买什么书万网账户
  • 公众平台微信公众号官网绍兴seo排名公司
  • 龙岗网站开发宿松网站建设推荐秒搜科技
  • 建网站 pdf郑州做网站推广运营商
  • 做网站签到挣钱吗打开网站建设中是什么意思
  • 知名网站开发公司2022世界物联网
  • 上海网站建设startup wordpress
  • 合肥工程建设交易中心网站网站建设需要哪些材料
  • 万宁网站建设厦门网站设计公司找哪家福建小程序开发
  • 阿里云服务器搭建个人网站如何搭建英文网站
  • 医疗软件网站建设公司为什么企业建设银行网站打不开
  • 自己做网站用什么数据库网络公司的名字
  • 电子商务网站建设的目的和作用汶上外贸网站建设
  • 网页图片格式品牌关键词优化
  • 网站建设人员需求毕业设计某网站开发的开题报告范文
  • 网站中如何嵌入支付宝树在线网页制作网站
  • 做网站推广的一般都是什么公司北京平面设计公司排行榜
  • 东莞网站推广衣裙购买天猫店铺网站
  • 有什么网站可以做电子版邀请函简易购物网站前端模板
  • 调整百度对网站的最大天级抓取频次值个人音乐网站模板
  • 网站建设电子邯郸网站建设项目
  • 绍兴网站制作多少钱做电商网站需要会些什么问题
  • 济宁哪家网站建设公司正规google 谷歌
  • 邯郸有学做搭建网站的吗北京知名的网站建设公司排名
  • 贵州城乡建设部网站首页网站建设方向课程
  • 广西建设职业技术学院教育网站失信被执行人查询系统
  • 网站加首页移动互联网开发平台基于linux安卓
  • 阿里云网站建设官方自营店免费的企业网站建设流程
  • 建设部注册监理工程师网站国内做的比较好的旅游网站