Save only the visible part of the image

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

Moderator: Alex

Post Reply
Ektoplasma
Posts: 4
Joined: Sun Feb 16, 2014 9:07 pm

Save only the visible part of the image

Post by Ektoplasma » Fri Feb 21, 2014 1:21 pm

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

Alex
Site Admin
Posts: 1445
Joined: Thu Jul 10, 2008 2:21 pm

Re: Save only the visible part of the image

Post by Alex » Mon Feb 24, 2014 12:03 pm

Hello Heinz,

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

Here is an example:

Code: Select all

VintasoftImage imageViewerVisiblePart = WpfImageViewer1.GetCurrentImageRect(WpfImageViewer1.ViewerState.ImageVisibleRect, true);
Best regards, Alexander

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest