RadImageEditor Default options

1 Answer 88 Views
ImageEditor
Jay
Top achievements
Rank 1
Jay asked on 31 Dec 2021, 08:31 PM

Dug through the maze of docs and actually found a few answers to my questions, but I'm not seeing anything on this.

I see how to add some custom buttons, like filters (aspnet-ajax/imageeditor/examples/filters/defaultcs.aspx).

What if I don't need a custom button but just want it to load up with some things already selected by default? Any way to do that?

For example,

1) Load up the image already zoomed out.

2) Or, at least have the zoom already set to zoom out so I don't have to do the dropdown.

3) Have save image default to "Save Image On Server."

4) Have "Constrain Proportions" already turned off on "Crop Image".

I will add, I have had to resize and crop thousands of images, and the RadImageEditor has worked very well. It would be nice if there were some instructions on setting up more default options so there is a lot less clicking and dropdown navigation going on by default.

I'm toward the end of this and just found the grayscale filter. A built in filter to convert to true black and white would be great, too.

I'm cropping and resizing photos of receipts taken with cell phone.

Anyone having a custom filter to convert to true black and white, please feel free to share. Thanks.

 

 

 

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 05 Jan 2022, 03:46 PM

Hi Joy,

1) and 2) Calling the ImageEditor's zoomBestFit() method will allow you to zoom the loaded image as much as possible (so it remains visible in the editable canvas):
https://www.telerik.com/support/kb/aspnet-ajax/imageeditor/details/how-to-initially-zoom-the-loaded-image-to-best-fit

It is still possible to have visible parts of the canvas with this approach, though, If the proportions of the image are different than the ImageEditor's viewport. If you prefer to zoom the image until the whole canvas is covered (even if this is hiding part of the image into the scrollable part of the viewport), you can implement a similar approach:
https://www.telerik.com/forums/fit-options#-CLeuS-JSkieaWgIyKJKxA

3) and 4) You have to customize the Save (Save.ascx) and Crop (Crop.ascx) Dialogs. There is a demo that shows how to customize the built-in dialog which you can use as a base - https://demos.telerik.com/aspnet-ajax/imageeditor/examples/externaldialogspath/defaultcs.aspx

Crop.ascx

s<telerik:RadButton ID="btnConstraint" runat="server" ToolTip="Constrain Proportions"
					ToggleType="CheckBox" Checked="false" EnableViewState="false" AutoPostBack="false"
					CausesValidation="false">
					<ToggleStates>
						<telerik:RadButtonToggleState PrimaryIconCssClass="rieConstrainBtn" />
						<telerik:RadButtonToggleState PrimaryIconCssClass="rieRemoveConstrainBtn" />
					</ToggleStates>
				</telerik:RadButton>

You can also learn how to How to Customize a Built-in Command in this article.


Best Regards,
Rumen
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Jay
Top achievements
Rank 1
commented on 08 Jan 2022, 04:09 PM

Thanks. At least that gives me some direction to go in.
Tags
ImageEditor
Asked by
Jay
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or