Forum 'VintaSoft Imaging .NET SDK and Plug-ins Discussions'

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Board index < VintaSoft Imaging < VintaSoft Imaging .NET SDK and Plug-ins Discussions

Login

Save only the visible part of the image



Save only the visible part of the image

Post by Ektoplasma »

Hi Alex,

I would like to save just the visible part of the image which is shown in
the imageViewer. For example after zooming I would like to crop the visible
part and save it as a new image. How can I do that?

Thank you for your help,
Best regards,
Heinz


Re: Save only the visible part of the image

Post by Alex »

Hello Heinz,

You can get visible part of WPF image viewer using the WpfImageViewer.GetCurrentImageRect(Rect,Boolean) method.

Here is an example:
VintasoftImage imageViewerVisiblePart = WpfImageViewer1.GetCurrentImageRect(WpfImageViewer1.ViewerState.ImageVisibleRect, true);
Best regards, Alexander


Page 1 from 1: 1