Save selected area in rotated documents

Discussions about image processing and document imaging.
Post Reply
Posts: 27
Joined: Tue May 02, 2017 5:51 pm

Save selected area in rotated documents

Post by rlagrange » Tue May 23, 2017 5:41 pm


I'm in a similar position than here : viewtopic.php?f=30&t=2558
but my documents are rotated.

The only way I found is to Render the page to picture, cancel the rotation by applying an inverse rotation of the effective one, then crop the picture with the RectCoordinatesOnDocuments.
This work well, but the rotation is done on the whole page before crop, which take time.

But i'm unable to find a way to crop the picture before rotating it, I'm always lost in coordinates references whatever i'm doing :
RectCoordinateOnDocument is without the rotation
RenderPageToGdPictureImage is always rotated
RectCoordinateOnViewer, always rotated, doesn't solve the issue as we can't know the margin into the viewer to fit the page

Could you provide a sample demonstrating that ?

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 4 guests