Open source .NetCore general tool library Xmtool usage serialization – Image processing

Open source .NetCore general tool library Xmtool usage serial – Image processing articles [Github source code] “Previous Article” introduced the extended dynamic objects in the Xmtool tool library. Today we will continue to introduce to you the image processing class library. In our software system, we often need to perform various processing on images; for example, the most common avatar scaling requires scaling the images uploaded by users to the optimal size required by the system. This toolkit mainly summarizes commonly used image methods for the convenience of developers. Currently, the package only provides methods for image scaling and image generation base64 strings, and will continue to be added as needed. Zoom image files Scale the image data stream Convert image files into Base64 strings Convert image data stream into Base64 string Convert the content of the Image object into a Base64 string 1. Zoom the image file public Image Resize(string originFile, int height, int width, bool keepRatio, bool getCenter) Description: Scale the original image file to the specified width and height, and return the generated image object. ImageTool tool = Xmtool.Image(); Image result = tool.Resize(“c:\avatar.png”, 200, 200, true, true); // TODO 2. Scale the image data stream public Image…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: 34331943@QQ.com

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索