AspJpeg 水印组件参数详细说明
大家可以自行查看安装后的帮助文件,根据自己的实际需要更改相应的参数设置,我这里给出一些jpeg.Canvas.DrawGraph '设置水印透明度
Jpeg.Canvas.Font.Color = &HFF0000 '// 文字的颜色
Jpeg.Canvas.Font.Family = 'monospace' '// 文字的字体
Jpeg.Canvas.Font.Bold = True
Jpeg.frame: black, 2-pixel width
Jpeg.Canvas.Print 10, 10, ImageMode '// 加入文字的位置坐标
Jpeg.Canvas.Pen.Color = &HFFFFFF '// 边框的颜色
Jpeg.Canvas.Pen.Width = 0 '// 边框的粗细
Jpeg.Canvas.Brush.Solid = False '// 图片边框内是否填充颜色
Jpeg.DrawImage Jpeg.Width/1.6, Jpeg.Height/1.5, Logobox, 0.4, &HFFFFFF '// 加入图片的位置价坐标(添加水印图片)
Jpeg.Canvas.Bar 0, 0, Jpeg.Width, Jpeg.Height '// 图片边框线的位置坐标
Jpeg.Canvas.Font.Color = &HFF0000 '// 文字的颜色
Jpeg.Canvas.Font.Family = 'monospace' '// 文字的字体
Jpeg.Canvas.Font.Bold = True
Jpeg.frame: black, 2-pixel width
Jpeg.Canvas.Print 10, 10, ImageMode '// 加入文字的位置坐标
Jpeg.Canvas.Pen.Color = &HFFFFFF '// 边框的颜色
Jpeg.Canvas.Pen.Width = 0 '// 边框的粗细
Jpeg.Canvas.Brush.Solid = False '// 图片边框内是否填充颜色
Jpeg.DrawImage Jpeg.Width/1.6, Jpeg.Height/1.5, Logobox, 0.4, &HFFFFFF '// 加入图片的位置价坐标(添加水印图片)
Jpeg.Canvas.Bar 0, 0, Jpeg.Width, Jpeg.Height '// 图片边框线的位置坐标
对照参数:
Jpeg.Canvas.Font.Size = 15 '字体大小
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 = "Opaque" ' to make antialiasing work为了生成的参数不能变
Jpeg.Canvas.Print Jpeg.OriginalWidth-120, Jpeg.OriginalHeight-35, sSYText
'打印文字的位置和文字内容
' 绘制图片边框
Jpeg.Canvas.Pen.Color ="&H"&sSYShadowColor ' Black
Jpeg.Canvas.Pen.Width = nSYShadowOffset
Jpeg.Canvas.Brush.Solid = False ' or a solid bar would be drawn
Jpeg.Canvas.DrawBar nSYShadowOffset, nSYShadowOffset, Jpeg.Width, Jpeg.Height
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 = "Opaque" ' to make antialiasing work为了生成的参数不能变
Jpeg.Canvas.Print Jpeg.OriginalWidth-120, Jpeg.OriginalHeight-35, sSYText
'打印文字的位置和文字内容
' 绘制图片边框
Jpeg.Canvas.Pen.Color ="&H"&sSYShadowColor ' Black
Jpeg.Canvas.Pen.Width = nSYShadowOffset
Jpeg.Canvas.Brush.Solid = False ' or a solid bar would be drawn
Jpeg.Canvas.DrawBar nSYShadowOffset, nSYShadowOffset, Jpeg.Width, Jpeg.Height
分享到: