I have an ImageInline in xaml file. And loading this image file is relatively slow. So I think it is the main reason throw that exception. Has anyone had this problem? Please help me answer this question.
Many thanks.
Telerik.Windows.Documents (Version: 2021.1.223.45)
Telerik.Windows.Documents.FormatProviders.Xaml (Version: 2021.1.223.45)
Telerik.Windows.Documents.FormatProviders.Html(Version: 2021.1.223.45)
When inserting image to Richtextbox editor (UI for wpf demo application) through insert image command from Ribbon menu and save document as .rtf. Generated document size is more than (almost twice) of inserted image.
To reproduce this issue, insert any image (sample attached) and save as .rtf. When comparing document size with image size.
Image size is 2.94 MB
.rtf document size is 5.89 MB.
When I open image editor to resize image, I noticed that current image size is 51.5 MB (screenshot attached). Is this correct image size?
Another issue I found in Richtextbox editor is that pasting image from clipboard is not working. Same can be reproduced in demo app.
Is there work around to reduce the image size when inserting image from clipboard or inserting image. Also how I can enable paste image from clipboard.
Current behavior generates large .rtf document, which If import to wpf richtextbox editor or MS word then application hangs.
Hi,
when i recently use the image editor with big picture(for example 6000*5000 pixel), after drawing several rectangle using shape tool, it gave me:
System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
at System.Windows.Media.Imaging.WriteableBitmap.InitFromBitmapSource(BitmapSource source)
at System.Windows.Media.Imaging.WriteableBitmap..ctor(BitmapSource source)
at Telerik.Windows.Media.Imaging.RadBitmap..ctor(Int32 width, Int32 height, FrameworkElement element, Boolean measureAndArrange)
at Telerik.Windows.Media.Imaging.Commands.DrawCommand.Execute(RadBitmap source, Object context)
at Telerik.Windows.Media.Imaging.History.ImageHistory.Execute(IImageCommand command, Object context)
at Telerik.Windows.Controls.RadImageEditor.ExecuteCommand(IImageCommand command, Object context)
at Telerik.Windows.Controls.RadImageEditor.CommitTool(Boolean executeSameToolAfterCommit)
at Telerik.Windows.Media.Imaging.Tools.DrawToolBase.InvokeEndDraw(Point point)
at Telerik.Windows.Media.Imaging.Tools.DrawToolBase.DrawingCanvas_MouseLeftButtonUp(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
it seems that related to the history memory to me, based on previous discussion:
https://www.telerik.com/forums/out-of-memory-exception-when-cropping-image
but when i assgin a larger MaximumMemoryBufferSize in the imageeditor, the issue still remained, any suggestions on this?
Hello,
We are planning to use the WPf RadImage in order to preview, maybe retouch, save and print images.
Then I have two questions :
Can we import base64 string images in RadImageEditor ?
Is there a way to print from the RadImageEditor ?
Thanks for your help
Julien
Hello.
I am using RadImageEditor.
I'm done with the setup. It actually works too.
But when I shift + wheel, not only horizontal movement but also vertical scrolling.
I want to move only horizontal scrolling when shift is pressed.
Which part should I control?
<telerik:RadImageEditor x:Name="xImageEditor" Image="{Binding RadImage}" behaviour:HorizontalScrollViewerHelper.IsShiftWheelProperty="True" IsPanningEnabled="True"/>
<imageEditor:ZoomController ImageEditor="{Binding ElementName=xImageEditor}" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
public static class HorizontalScrollViewerHelper
{
public static bool GetIsShiftWheelProperty(DependencyObject obj) => (bool)obj.GetValue(IsShiftWheelProperty);
public static void SetIsShiftWheelProperty(DependencyObject obj, bool value) => obj.SetValue(IsShiftWheelProperty, value);
public static readonly DependencyProperty IsShiftWheelProperty
= DependencyProperty.RegisterAttached("IsShiftWheel",
typeof(bool),
typeof(HorizontalScrollViewerHelper),
new PropertyMetadata(false, HorizontalScrollCallback));
private static void HorizontalScrollCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var imageEditor = d as RadImageEditor;
imageEditor.PreviewMouseWheel += ImageEditor_PreviewMouseWheel;
}
private static void ImageEditor_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
{
if (((RadImageEditor)sender).ChildrenOfType<ScrollViewer>().FirstOrDefault() is ScrollViewer scrollViewer)
{
if(Keyboard.Modifiers.Equals(ModifierKeys.Shift))
{
if (e.Delta < 0)
{
scrollViewer.LineRight();
}
else
{
scrollViewer.LineLeft();
}
//scrollViewer.ScrollToHorizontalOffset(scrollViewer.HorizontalOffset + (-e.Delta / 300));
}
}
}
}
Thanks.
Hello.
I tried binding using Rad Image Editor. However, only white images are visible.
1. My provided source compares the normal BitmapSource binding and the RadBitmap binding, and you can see that the normal BitmapSource is bound and the RadBitmap is not.
What's my problem?
2. I've heard that it's not good to put RadBusyIndicator in the Loaded Event when using it. (In general, when using BusyIndicator, not telerik)
So, after Show(modeless), I used async Task to process the initial setting data.
Is this method okay for modeless limitation?
I Using Telerik Version 2021.2.719.45 XAML [No theme specified (default)]
Thanks.
Good morning, I would like to know if there is a tool to move text or any part of the image, it would be very useful. I hope you can answer my question.
best regards
Javier
I need coordinates where exactly I clicked the mouse on the loaded image in WPF RadImageEditor (not the coordinator of the editor but the image). Any ideas how to achieve this goal?
Andrzej
Hi,
I would like to implement the RadImageEditor for a person to save a signatur. No editing or anything is required. I load the ImageEditor with an empty png and directly load the drawtool. I've inherited the default DrawTool to hide the UIElement (since I don't want to have those settings visible) but when I stop drawing I still get the OK/Cancel buttons.How can I hide those as well? Any drawing made can be committed directly.
Thanks!