Skip to content

CenterCrop upscales by default #2964

Open
@weidongjian

Description

@weidongjian

Glide Version:Glide 4.6.1

Integration libraries:Glide 4.6.1

Issue details / Repro steps / Use case background:

Glide load line / GlideModule (if any) / list Adapter code (if any):

private String smalImagelUrl= "http://olal87ycc.bkt.clouddn.com/5a4b556e8b171m8ifn4gse4280.jpg!thumb120";
GlideApp.with(this).load(smalImagelUrl).into(imageView);

Layout XML:

<FrameLayout xmlns:android="...>
<ImageView
        android:id="@+id/imageview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        />
<>

image original size is 120 * 213, and imageview size is 1080 * 1920, and the result bitmap size is 1080 * 1920. the real image size is larger than original size.
i think if original size is small than view size, result bitmap size should used original size.

I know can use override to control bitmap size, but in my cast, the image original size is unknown in advance,

当图片的尺寸小于视图的尺寸的时候,应该使用图片的尺寸,两者取小的那个。

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions