Skip to content

Output image is incorrectly clipped when rotation angle is 90 degrees. #2

@jeffstearns

Description

@jeffstearns

Imagine a document in landscape mode. It is wider than it is tall.

The document happens to have an image with many vertical lines. DeskewService.deskew() decides that the image is skewed by 90 degrees.

deskew() rotates the image by 90 degrees, producing a portrait image. Unfortunately, it writes this image to an output document in landscape mode.

Thus a portrait image is now clipped to the dimensions of a landscape document.

(I did some trial-and-error editing of GraphicsService.rotateImage() but didn't stumble upon a fix. I'm a complete newbie with openCv and PIL, so this should be no surprise.)

I attached the input and output images.
floorplan
floorplan-deskewed

Please let me know how I can help! thanks

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions