Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Is it possible to zoom&pan to a specific region (rectangle/point) of the given image, similar to center-crop, but customizable? #253

Open
AndroidDeveloperLB opened this issue Dec 17, 2024 · 4 comments

Comments

@AndroidDeveloperLB
Copy link

There are various scaling methods here, but let's say I want to use something like center-crop, yet not always to the center, and also not always on one of the edges (start/end).

This means, for example, that sometimes I prefer to focus on a specific region of the given bitmap.

This is important if I know that this region is more important than the rest.

For example, suppose I have a photo of a person, and the face of the person is in some given rectangle in the bitmap. I want the library to focus this region at the beginning, but still fit to the space that it has, keeping aspect-ratio.

Another example is when I have a landscape image, and I want to show it in a portrait container, yet it's not exactly the center that I want to focus on, and instead some percentage in start-X and end-X of the given image. Still, again, it's a rectangle to focus on.

Is such a thing possible here?

@AndroidDeveloperLB AndroidDeveloperLB changed the title Question: Is it possible to zoom&pan to a specific region (rectangle/point) of the given image? Question: Is it possible to zoom&pan to a specific region (rectangle/point) of the given image, similar to center-crop, but customizable? Dec 17, 2024
@Piasy
Copy link
Owner

Piasy commented Dec 17, 2024 via email

@AndroidDeveloperLB
Copy link
Author

@Piasy What do you mean SSIV ? Can you please give me more clues, or if it's easy, let me know how to do it using your own code?

@Piasy
Copy link
Owner

Piasy commented Dec 18, 2024 via email

@AndroidDeveloperLB
Copy link
Author

AndroidDeveloperLB commented Dec 18, 2024

So it can't be here?
I need to fork the dependency there, and then fork from here, to add this?
Is there any other alternative?
The repository here offers to reach any zoom&movement in the image by the user. I think it should be possible to do it via code...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants