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

I think GifDrawable should be designed to open pictures that are not GIF format. #534

Open
ihewro opened this issue Apr 7, 2018 · 1 comment

Comments

@ihewro
Copy link

ihewro commented Apr 7, 2018

Firstly, thank you for you project. It help me a lot ! but I have this issues.

When I use this project in the way of XML:

    <pl.droidsonroids.gif.GifImageView
        android:id="@+id/expression_image"
        android:layout_width="150dp"
        android:layout_height="150dp"
        android:src="@drawable/bg"/>

it can show picture which is not gif format

so why GifDrawable is designed to show the picture whic is only gif format?

Sometimes , I hava this need: I open an inputStream from a picture uri, but the uri may be from gif , png or other format,I want to show image through the gifDrawable,but it occurs error(103,Data is not in GIF format)

it is not friendly, I think it should automatically to show all format images rather than throws an error

@koral--
Copy link
Owner

koral-- commented Apr 14, 2018

Sorry, for the delay.
Currently, GifImageView tries to load resource set using android:src as GifDrawable and falls back to default ImageView behavior if src is not a GIF.
On the other hand, GifDrawable works at the lower level of abstraction and supports only GIFs. There is no code to handle other image formats at this level.

I think that I can optionally add fabric methods like createFromPath which return type is Drawable.

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

2 participants