Ejemplo n.º 1
0
 private GifAnimationMetaData(final GifInfoHandle gifInfoHandle) {
   mLoopCount = gifInfoHandle.getLoopCount();
   mDuration = gifInfoHandle.getDuration();
   mWidth = gifInfoHandle.getWidth();
   mHeight = gifInfoHandle.getHeight();
   mImageCount = gifInfoHandle.getNumberOfFrames();
   gifInfoHandle.recycle();
 }
Ejemplo n.º 2
0
 /**
  * Retrieves metadata from {@link Uri} which is resolved using {@code resolver}. {@link
  * ContentResolver#openAssetFileDescriptor(Uri, String)} is used to open an Uri.
  *
  * @param uri GIF Uri, cannot be null.
  * @param resolver resolver, null is allowed for file:// scheme Uris only
  * @throws IOException if resolution fails or destination is not a GIF.
  */
 public GifAnimationMetaData(@Nullable ContentResolver resolver, @NonNull Uri uri)
     throws IOException {
   this(GifInfoHandle.openUri(resolver, uri, true));
 }