一聚教程网:一个值得你收藏的教程网站

热门教程

aspjpeg给图片加水印 代码

时间:2022-07-02 23:14:56 编辑:袖梨 来源:一聚教程网

aspjpeg给图片加水印 代码.以下是我的aspjpeg参数配置,请高手帮我看看应该怎么修改,才能实现上面几种我想要的效果。谢谢
--------------------------------
参数:
sSYText = "www.google.com"
  sSYFontColor = "000000"
  nSYFontSize = Clng("24")
  sSYFontName = "Verdana, Arial, Helvetica, sans-serif"
  sSYPicPath = "../imgs/wa.png"
  nSYMinSize = Clng("300")
  sSYShadowColor = "FFFFFF"
  nSYShadowOffset = Clng("2")
  sSYText200")'文字水印宽、高
  nSYText40")
  sSYPic20")'图片水印右边距、底边距
  nSYPic20")
  nSYalpha = 1

文字水印:
Jpeg.Canvas.Font.Color ="&H"&sSYFontColor
      Jpeg.Canvas.Pen.Color ="&H"&sSYFontColor
      Jpeg.Canvas.Font.Family = "'"& sSYFontName &"'"
      Jpeg.Canvas.Font.Bold = True
      Jpeg.Canvas.Font.Size = nSYFontSize
      Jpeg.Canvas.Font.BkColor=&H5FD211
      Jpeg.Canvas.Font.Quality = 4 '0 (Default), 1 (Draft), 2 (Proof), 3 (Non-Antialiased), 4 (Antialiased)
      Jpeg.Canvas.Font.BkMode = "Transparent" ' to make antialiasing work
      Jpeg.Canvas.Print Jpeg.OriginalWidth-sSYTextWidth, Jpeg.OriginalHeight-nSYTextHeight, sSYText

      Jpeg.Canvas.Pen.Color ="&H"&sSYShadowColor
      Jpeg.Canvas.Pen.Width = nSYShadowOffset
      Jpeg.Canvas.Brush.Solid = False
      Jpeg.Canvas.DrawBar nSYShadowOffset, nSYShadowOffset, Jpeg.Width, Jpeg.Height

图片水印:
Jpeg.Canvas.Pen.Color  = &HFFFFFF
        Jpeg.Canvas.Pen.Width  = 0   
        Jpeg.Canvas.Brush.Solid = False   
        Jpeg.Canvas.Bar 0, 0, Jpeg.Width, Jpeg.Height
        Jpeg.Width = Jpeg.Width
        Jpeg.height = Jpeg.height
        Jpeg.Sharpen 1, 120
        Jpeg.DrawImage Jpeg.Width-Jpeg1.Width-sSYPicWidth, Jpeg.Height-Jpeg1.Height-nSYPicHeight, Jpeg1, nSYalpha, &HFFFFFF

热门栏目