Crop Image After Zooming

Example requests & Code samples for GdPicture Toolkits.
Post Reply
adadero
Posts: 3
Joined: Sat May 24, 2014 4:56 pm

Crop Image After Zooming

Post by adadero » Fri Jun 20, 2014 1:04 am

Hi Loic,
Can I crop an image on a GDViewer after zooming in with the exact size of the GDViewer? For example, I have an image of 400px height and 300px width loaded onto GDViewer. Then I use GDViewer.SetZoomWidthViewer(). What I need is how to make the size of the image equal zooming visibility on GDViewer control.

Thank you.

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: Crop Image After Zooming

Post by SamiKharma » Mon Jul 07, 2014 10:00 am

Hi,

This is very easy to accomplish:
1. Get the displayed area after zooming using GdViewer.GetDisplayedArea http://guides.gdpicture.com/content/GdP ... dArea.html
2. Copy that region to a new GdPictureImage identifier using GdViewer.CopyRegionToGdPictureImage
http://guides.gdpicture.com/content/GdP ... Image.html

I hope this helps.

Best,
Sami

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest