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

Notification

Icon
Error

Options
Go to last post Go to first unread
GeorgeCampos  
#1 Posted : Saturday, September 20, 2008 9:31:11 PM(UTC)
GeorgeCampos

Rank: Advanced Member

Groups: Member
Joined: 6/15/2006(UTC)
Posts: 31

Thanks: 8 times
Description: I am exploring using PhotoEditor or GraphicsMill on our website. How do I get access to the values in the array list in the cropping function?

bitmapViewer1.invokeRemoteMethod("Crop", [r.x, r.y, r.width, r.height]);

Background information:
The options array contain coordinates of the crop area in the following order:
1. X-coordinate of the top left corner of the crop area.
2. Y-coordinate of the top left corner of the crop area.
3. Width of the crop area.
4. Height of the crop area.

I need to be able to store these values in a database in the server and access them later. Can you point me in the right direction? Is there some sample code I can look at?

Thanks,
George

Dmitry  
#2 Posted : Monday, September 22, 2008 8:46:50 PM(UTC)
Dmitry

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)
Hello George,

If you need to get crop values and change them from your code, you can find the solution in this post.

Edited by user Tuesday, September 23, 2008 3:05:44 PM(UTC)  | Reason: Not specified

Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
GeorgeCampos  
#3 Posted : Tuesday, September 23, 2008 5:13:23 PM(UTC)
GeorgeCampos

Rank: Advanced Member

Groups: Member
Joined: 6/15/2006(UTC)
Posts: 31

Thanks: 8 times
Dimitry,

I read the answer in the post above.

My question is different. Once a user has cropped their image I want to store the information about their crop. I don't need to change the cropping width and height options at runtime, like John Thelen in his post.

I need to find out what the user does to his image. I need to find out where they placed their cropping rectangle:
x & y coordinates of the top left corner of the crop area,
+ width & height of the crop area.

This information is already being communicated between the client and the server. How do I get access to it?

I am not very smart, so the answer may be very obvious and already there and I am just not understanding how to it.

Specifically, when the user clicks on 'Apply Crop' I want Photo Editor to crop the picture (like it already does very well). I also want Photo Editor to pass me the parameters of the cropping rectangle so that I can store them in a database.

How can I do this?

Your continued help is greatly appreciated.

Thanks,
George Campos
Sergey Peshekhonov  
#4 Posted : Wednesday, September 24, 2008 6:09:03 PM(UTC)
Sergey Peshekhonov

Rank: Advanced Member

Groups: Member
Joined: 6/5/2007(UTC)
Posts: 57

Hello George,

As for GraphicsMill, to use crop functionality on your web site you can try AjaxControls. See PhotoCropping sample for implementation details (source code can be found here: Start -> Aurigma->GraphicsMill 4.5 for .NET 2.0 -> Web Demos Source Code -> ASP.NET Ajax Code C#).

In PhotoCropping.aspx you can find

Code:
bitmapViewer1.invokeRemoteMethod("Crop", [r.x, r.y, r.width, r.height]);

which calls server function named "Crop". In this function (see PhotoCropping.aspx.cs) you can add functionality to save crop sizes to database.

As for PhotoEditor - you can't get size of crop rectangle directly. If you want to apply crop effect for bitmap later you can use PhotoEditorController.EditingOptions property to get serialized parameters and save them to database (for example during butShow_Click in Default.aspx of PhotoEditorSample). And when you assign stored string back to the same property all effects will be applied to the PhotoEditorSample1.SourceImageFileName bitmap.

By the way, for what purpose do you need this "delayed effects applying"?
Sincerely yours,
Sergey Peshekhonov.

Aurigma Technical Support Team.
GeorgeCampos  
#5 Posted : Wednesday, September 24, 2008 10:36:57 PM(UTC)
GeorgeCampos

Rank: Advanced Member

Groups: Member
Joined: 6/15/2006(UTC)
Posts: 31

Thanks: 8 times
"Delayed effect applying" is needed because interactively the user is telling us how he wants his picture cropped (on a preview, not full resolution image), then later the production software will apply the proportionate cropping rectangle instructions to the full resolution image at render and print time.

We have been using your uploader product since 2005 and are very satisfied. Now we are very excited to start using your GraphicsMill product on our website.

Congratulations to you and your team for producing excellent products.

Keep up the good work!
George Campos
Sergey Peshekhonov  
#6 Posted : Thursday, September 25, 2008 9:16:20 PM(UTC)
Sergey Peshekhonov

Rank: Advanced Member

Groups: Member
Joined: 6/5/2007(UTC)
Posts: 57

Hello George,

PhotoEditor has feature which allows user to work with small preview image in user interface. In PhotoEditorSample this feature is turned on by default. To configure it you may open PhotoEditorSample.ascx in PhotoEditorSample web site and play with these options of ImagePanel control

Code:

ResizingEnabled="True" FitHeight="768" FitWidth="1024"


This allows user to work with 1024x768 preview during editing and when you call PhotoEditorSample1.GetBitmap() you will get full resolution image with all effects applied.
Sincerely yours,
Sergey Peshekhonov.

Aurigma Technical Support Team.
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.