Welcome Guest! You need to login or register to make posts.



Go to last post Go to first unread
#1 Posted : Thursday, March 5, 2009 8:08:07 AM(UTC)

Rank: Member

Groups: Member
Joined: 1/12/2009(UTC)
Posts: 11

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)

//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);
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);

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):
#2 Posted : Sunday, March 8, 2009 9:39:04 PM(UTC)

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)

It seems this problem occurres on Visual Studio 2008 development web server only. According to MSDN forum http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=200532&SiteID=1 you need to define members for each control used on the page. In you case you need to add the following lines:

namespace NovaTerraWebsite
  public partial class CropIt1 : System.Web.UI.Page
    protected Aurigma.GraphicsMill.AjaxControls.BitmapViewer BitmapViewer1;
    protected Aurigma.GraphicsMill.AjaxControls.RectangleRubberband RectangleRubberband1;
    protected void Page_Load(object sender, System.EventArgs e)

You need to do the same for each control you use on your page.

Edited by user Sunday, March 8, 2009 9:39:46 PM(UTC)  | Reason: Not specified

Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.