Skip to content

[FEAT] CropStateManager.crop() should crop on the original bitmap instead of a scaled down one #7

@ThomasKiljanczykDev

Description

@ThomasKiljanczykDev

Is your feature request related to a problem? Please describe.
I'm maintaining an app which, among others, stores images of sheet music and chord pages. This is a text/text-adjacent content and it requires a decent resolution for it to be legible.

Your current implementation outputs a scaled down image on crop. What I mean by that is that you scale down an image to fit into the UI canvas and then use it as a source for the cropping when the user wants to output the final result.

Describe the solution you'd like
I propose to modify the CropState so that it store the originalBitmap. This originalBitmap can then be used in the crop() logic instead of the scaled down bitmap to output a cropped image that adheres to the original image resolution.

Describe alternatives you've considered
Right now I've been temporarily forced to inline your library into my project to resolve the issue myself.
I tried to implement the cropping myself without the inlining, but your library does not expose any crop rect data that I could use to do it that way.

Additional context
I've already tested this solution in my app. It works well for the usual fit scaling as well as other scaling modes.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions