Skip to content

Displaying in RGB_565, downloading in ARGB_8888 #751

@redwarp

Description

@redwarp

I'm working on an app that uses Glide to display a lot of pictures, and it's awesome. Low memory, thanks to the default format that is RGB_565.
But at some point, I wanted to allow the user, after he clicks on a thumbnail, to send an image resized to 1000x1000 to a server.
I thought "oh great, Glide can do the resizing! I'll use Glide to load my url, then downloadOnly to my final size. That will get me a File, that I can use in a FileInputStream.

And it works! But the final result is, of course, in RGB_565 as well. And so far, I found no way to force Glide to use setDecodeFormat for only one operation.
It's either I setup the GlideModule for ARGB_8888, and that will be used everywhere in the app, or keep using RGB_565.

Is it possible to force Glide to use a decode format for one operation? (If not, it would be a great feature!)

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions