I have been trying for 2 weeks - with NO success.
I very desperately need help .. can someone out there help me ???
Steps I have taken:
1. Aurigma's Photocropping sample page -PhotoCropping.aspx
I copied this code into my CropIt1.aspx page in my web project ...
2. I added
references to the 3 Aurigma dlls.
( I have also tried adding them to the bin - but get errors)
When I compile I get alot of errors => I have attached a screenshot ...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Aurigma.GraphicsMill;
using Aurigma.GraphicsMill.AjaxControls;
namespace NovaTerraWebsite
{
public partial class CropIt1 : System.Web.UI.Page
{
protected void Page_Load(object sender, System.EventArgs e)
{
if (!Page.IsPostBack)
{
//BitmapViewer1.Bitmap.Load(Server.MapPath("~/TestImages/building.jpg"));
//DEBUG:
BitmapViewer1.Bitmap.Load(Server.MapPath("~/TestImages/redeye.jpg"));
//Set rectangle for landscape 4 x 6" format
float ratio = 4f / 6f;
RectangleRubberband1.Ratio = ratio;
if (BitmapViewer1.Bitmap.Height >= BitmapViewer1.Bitmap.Width * ratio)
{
int height = (int)Math.Round(BitmapViewer1.Bitmap.Width * ratio);
RectangleRubberband1.Rectangle = new System.Drawing.Rectangle(
0, (BitmapViewer1.Bitmap.Height - height) / 2, BitmapViewer1.Bitmap.Width, height);
}
else
{
int width = (int)Math.Round(BitmapViewer1.Bitmap.Height / ratio);
RectangleRubberband1.Rectangle = new System.Drawing.Rectangle(
(BitmapViewer1.Bitmap.Width - width) / 2, 0, width, BitmapViewer1.Bitmap.Height);
}
}
}
[RemoteScriptingMethod()]
public void Crop(int left, int top, int width, int height)
{
BitmapViewer1.Bitmap.Transforms.Crop(left, top, width, height, RgbColor.White);
}
}
}
Edited by user Thursday, March 5, 2009 8:11:38 AM(UTC)
| Reason: Not specified
dorisf attached the following image(s):