Skip to content

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

@AndroidDeveloperLB

Description

@AndroidDeveloperLB

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions