BitmapCutter.Core 引用步骤

1 将BitmapCutter.Core项目或者dll引用到需要的项目底下。

2 前台页面

<img id="imgPreview1" title="点击上传图片" src="$!ImgPath" style="width: 220px; height: 140px;" onclick="ShowUCIBox(158, 158, 1)" />
<input id="ctl00_ContentPlaceHolder1_hdnImageUrl1" name="ImgPath" type="hidden" runat="server" value="$!ImgPath" />

3     <!--剪裁图片Start-->
    <script type="text/javascript" src="$webpath/library/js/bitmapcutter/jquery.overlay.js"></script>
    <script type="text/javascript" src="$webpath/library/js/bitmapcutter/jquery.bitmapcutter.js"></script>
    <script type="text/javascript" src="$webpath/library/js/bitmapcutter/UploadCutImage.js"></script>
    <link href="$webpath/library/js/bitmapcutter/jquery.bitmapcutter.css" rel="stylesheet" type="text/css" media="screen" />
    <!--剪裁图片End-->

4  页面初始化 $(function () {  CreateUploadImageBox();});

 

5 引用jquery包 。jquery-1.7.2.min.js 注意有些包比较新 jQuery.browser.msie 此方法会重新改写

6 Webconfig中添加

   <httpHandlers>
      <add path="scissors.axd" verb="*" type="BitmapCutter.Core.HttpHandler.BitmapScissors,BitmapCutter.Core" validate="false"/>
    </httpHandlers>

7 上传图片的.ashx文件做相应的创建.

 

 

------------------------------------------------------------------over------------------------------------------------------------------------------

posted on 2016-06-16 14:43  hehedada  阅读(107)  评论(0编辑  收藏  举报

导航