How to crop an image using C#?

后端 未结 14 833
忘掉有多难
忘掉有多难 2020-11-22 05:16

How can I write an application that will crop images in C#?

14条回答
  •  隐瞒了意图╮
    2020-11-22 05:51

    There is a C# wrapper for that which is open source, hosted on Codeplex called Web Image Cropping

    Register the control

    <%@ Register Assembly="CS.Web.UI.CropImage" Namespace="CS.Web.UI" TagPrefix="cs" %>

    Resizing

    
    
    

    Cropping in code behind - Call Crop method when button clicked for example;

    wci1.Crop(Server.MapPath("images/sample1.jpg"));

提交回复
热议问题