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

Proposal: GIF support as plugable module #1367

Open
stepango opened this issue Jul 26, 2016 · 5 comments
Open

Proposal: GIF support as plugable module #1367

stepango opened this issue Jul 26, 2016 · 5 comments

Comments

@stepango
Copy link

Gif support increase lib size as well as methods count and compilation time. Mostly apps don't need GIF support.
Also pluggable modules approach could simplify glide-core codebase and speed up GIF-related fix releases as well as simplify adding support for new formats such as progressive jpeg or webm for earlier android versions.

@TWiStErRob
Copy link
Collaborator

TWiStErRob commented Jul 26, 2016

Historically (v3) GIF needed to be baked in because of how transcoding worked. There was a GifBitmapWrapper that handled either a normal or a GIF drawable. It looks like in v4 all the GIF logic is separated out into the .resource.gif package. It is likely independent now, so your proposal can be implemented.

Progressive JPEG and WebM integrations can be done regardless of separating GIF out, you just need a few supporting classes (decoder, transcoder) and then use them in a load. They could be done by any independent parties, in a similar manner to https://github.com/wasabeef/glide-transformations.

All of these are nice ideas, but may be not that pressing. Most of the it's time easier to change to the URL to return a jpeg instead of a webp on the server side; and ProGuard will get rid of your extra classes and methods.

That said, I think if anyone makes a PR for any of these, it'll be happily accepted by @sjudd.

@sjudd
Copy link
Collaborator

sjudd commented Jul 27, 2016

Yup I agree, I'd definitely accept pull requests.

@svenjacobs
Copy link

I was about to write the same. Method count should be reduced. The current version of Glide adds 2879 methods whereas Picasso only adds 849. I'm aware that Glide has more functionality but especially something like GIF support could be moved to an optional module. I've seen that synthetic accessor methods have already been removed. Good work! :)

@TWiStErRob
Copy link
Collaborator

@svenjacobs do those numbers hold up after ProGuarding as well?

@svenjacobs
Copy link

@TWiStErRob In our application Glide retains 1668 methods after ProGuard. We don't use GIF loading and we use the ProGuard configuration specified here.

@sjudd sjudd added the GIF label Nov 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants