Image Editor in Custom .NET Application

Mar 27, 2008 at 2:59 PM
Hello,

Thanks for the great control. I'm interested in using this in a non-DNN application based in .NET. Is this possible? If so, do you have any recommendations on how to do this as easily as possible? Thanks.

-Keith
Coordinator
Mar 28, 2008 at 2:00 PM
Richard,

I intentionally developed this as two separate controls. The first (ImageEditor) is an Asp.Net 2.0 + MS AJAX 1.1 script control. Along with the DynamicImage HttpHandler, it provides the basic editor functions including dynamic preview, cropping, flip/rotate, and brightness/contrast/saturation adjustments. Although it provides "hooks" in the form of properties and exposed events to facilitate uploading, opening, and saving image files, it does not do any file handling itself. The DNN demo module uses this control as its base and provides very simplistic DNN aware file handling. This control could be used directly in a .NET application but you will have to add the upload and file handling methods. On the other hand, the ImageEditorControl builds upon the ImageEditor to provide more comprehensive DNN aware file capabilities. I would suggest you take a look at both the Demo module and the ImageEditorControl source code to see how I added file handling to the base ImageEditor.

Bill

Richardsonke wrote:
Hello,

Thanks for the great control. I'm interested in using this in a non-DNN application based in .NET. Is this possible? If so, do you have any recommendations on how to do this as easily as possible? Thanks.

-Keith

May 16, 2008 at 2:20 PM
Thanks for the quick response.  I got pulled onto another project, so I hadn't had a chance to look more into your control.  Now that I've delved into it more, it's so simple!  Thank you for such a great control.  Setting the image, saving, and aspect ratio-based cropping work great (which are the most important things to me), but I'm having some problems with the rest of the features (flipping, rotating, etc).  For some reason, the first time they work fine, then they won't work again.  For example, the vertical flip makes the picture upside-down, but clicking it again doesn't make it right side up.  Oddly enough, though, clicking the horizontal flip when it's upside-down will cause it to show up right side up, but won't flip it horizontally.  I'm beginning to think it's an issue with me using .NET 3.5.  Does your control support the new version of the AJAX framework or do you know what else could be causing this?  Thanks.

-Keith
Coordinator
May 20, 2008 at 2:15 PM


Richardsonke wrote:
Thanks for the quick response.  I got pulled onto another project, so I hadn't had a chance to look more into your control.  Now that I've delved into it more, it's so simple!  Thank you for such a great control.  Setting the image, saving, and aspect ratio-based cropping work great (which are the most important things to me), but I'm having some problems with the rest of the features (flipping, rotating, etc).  For some reason, the first time they work fine, then they won't work again.  For example, the vertical flip makes the picture upside-down, but clicking it again doesn't make it right side up.  Oddly enough, though, clicking the horizontal flip when it's upside-down will cause it to show up right side up, but won't flip it horizontally.  I'm beginning to think it's an issue with me using .NET 3.5.  Does your control support the new version of the AJAX framework or do you know what else could be causing this?  Thanks.

-Keith

Keith,

I have not tried it in .NET 3.5 but can't think of any reason that it would not work. This sounds more like a cacheing issue. Are you using the file or in memory cache for temporary storage of the preview image? - that would be the CachePersistence property which defaults to memory. Is your .aspx page using and page cacheing? If you can bring the ImageEditor source into your development environment and recompile it for debugging, it would be interesting to know if a breakpoint set in the RaiseCallbackEvent method is getting hit each time a button is clicked. If you would like to e-mail me your .aspx page source (both .aspx and .aspx.vb or .aspx.cs) simplified as much as possible to still demonstrate the problem but without extra functions, I'd be glad to take a look at it. My e-mail address is bill AT wesnetdesigns DOT com.
Apr 15, 2014 at 3:52 AM
Thanks for share this great Image Editor in Custom .NET Application. Till now, works well.