Easy.COMMON/Photo.cs
(开头部分) 32KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Web;
using System.Web.UI;
using System.Text.RegularExpressions;
using ExeSql;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Net;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Drawing2D;
namespace Easy.COMMON
{
public class Photo
{
// Methods
public static void addWaterMark(string oldpath, string newpath, string markType, string WatermarkText, string WatermarkPosition, string Watermarkimgpath, bool toDelOldPicFlag, string familyName, int fontSize, bool isBold, string txtColorName, string bgColorName, int alpha)
{
try
{
Image image = Image.FromFile(oldpath);
Bitmap b = new Bitmap(image.Width, image.Height, PixelFormat.Format24bppRgb);
Graphics g = Graphics.FromImage(b);
g.Clear(Color.White);
g.SmoothingMode = SmoothingMode.HighQuality;
g.InterpolationMode = InterpolationMode.High;
g.DrawImage(image, 0, 0, image.Width, image.Height);
string CS40000 = markType;
if (CS40000 != null)
{
if (!(CS40000 == "image"))
{
if (CS40000 == "text")
{
goto Label_00A4;
}
}
else
{
addWatermarkImage(g, HttpContext.Current.Server.MapPath(Watermarkimgpath), WatermarkPosition, image.Width, image.Height, alpha);
}
}
goto Label_00C8;
Label_00A4:
addWatermarkText(g, WatermarkText, WatermarkPosition, image.Width, image.Height, familyName, fontSize, isBold, txtColorName, bgColorName, alpha);
Label_00C8:
b.Save(newpath, ImageFormat.Jpeg);
b.Dispose();
image.Dispose();
}
catch
{
}
finally
{
后面还有 671 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。