CloudYxt.Imager by www.cloudyxt.com

<PackageReference Include="CloudYxt.Imager" Version="1.0.0" />

.NET API 8,192 bytes

 ImageExt

public static class ImageExt
public static ImageCodecInfo GetEncoderInfo(string mimeType)

获取指定的mimeType

public static string RawFormatName(this Image img)

获取图片格式名称:JPG、GIF、BMP、PNG,若含有Unkown则无法识别

public static Bitmap ResizeTo(this Image img, int w = 0, int h = 0, int x = 0, int y = 0)

按指定尺寸重绘图片

public static byte[] ToJPGByte(this Bitmap img, long precision = 80)

转换为JPG字节数组

public static byte[] ToPNGByte(this Bitmap img)

转换为PNG字节数组

public static Bitmap WaterTo(this Image img, Image img_water, double x = 0, double y = 0, double mult = 0.24)

重绘图片并加水印