6 Answers, 1 is accepted
Hello, Fazera,
RadImageEditor supports zooming and provides a track bar for sliding the zoom factor out of the box. Please refer to the attached gif file. I believe that it would fit your scenario for zooming the images.
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Hey Dess, Thank you for reply.
Yes I know that RadImageEditor supports zooming and provides a track bar for sliding the zoom factor out of the box, but my client want better zooming like magnifying zooming or can zooming the image at current mouse location?
Currently, such functionality is not supported in RadImageEditor. However, if other customers have similar request, we will definitely consider it in the future improvement of the control.
You can have a look at the following KB article which demonstrates a sample approach how to create a control that allows pan and zoom functionality for images that may be suitable for your case: https://docs.telerik.com/devtools/winforms/knowledge-base/pan-and-zoom-image-control
Please have in mind that this is just a sample approach and it may not cover all possible cases. Feel free to modify and extend it in a way which suits your requirements best.
Should you have further questions please let me know.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Hye Dees, thank you for replying.
So now my current implementation for zooming is user can zoom the current image by scroll the mouse. It is ok, but my expectation, I want user zoom when the cursor place at the image.How can I zoom at current mouse location in the image?
This is my code,
private void OnMouseWheel(object sender, MouseEventArgs mea)
{
try
{
if (mainImageEditor.CurrentBitmap != null)
{
if (mea.Delta > 0)
{
SizeF currzoom = new SizeF(mainImageEditor.ZoomFactor.Width * 1.1f, mainImageEditor.ZoomFactor.Height * 1.1f);
mainImageEditor.ZoomFactor = currzoom;
mainImageEditor.ImageEditorElement.StartPan();
}
else
{
SizeF currzoom = new SizeF(mainImageEditor.ZoomFactor.Width * 0.9f, mainImageEditor.ZoomFactor.Height * 0.9f);
mainImageEditor.ZoomFactor = currzoom;
}
}
}
catch (Exception) { }
}
and the result as attached.
Hello, Fazera,
Zooming in an image considering the mouse position seems to be more like a general programming question. After some research, I have found the following threads that may be suitable for achieving your requirement: https://stackoverflow.com/questions/10694397/how-to-zoom-in-using-mouse-position-on-that-image
I have logged it in our feedback portal by creating a public feature request on your behalf. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.
I have also updated your Telerik points.
Please make sure that you cast your vote for it. The more votes an item gathers, the higher its priority becomes.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik