Skip to content

Commit

Permalink
Add support for jpgs in zip files (#1769)
Browse files Browse the repository at this point in the history
Fixes #1767
  • Loading branch information
gpeal authored Mar 22, 2021
1 parent 8ed9569 commit 8d0ea7d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ private static LottieResult<LottieComposition> fromZipStreamSyncInternal(ZipInpu
} else if (entry.getName().contains(".json")) {
com.airbnb.lottie.parser.moshi.JsonReader reader = JsonReader.of(buffer(source(inputStream)));
composition = LottieCompositionFactory.fromJsonReaderSyncInternal(reader, null, false).getValue();
} else if (entryName.contains(".png") || entryName.contains(".webp")) {
} else if (entryName.contains(".png") || entryName.contains(".webp") || entryName.contains(".jpg") || entryName.contains(".jpeg")) {
String[] splitName = entryName.split("/");
String name = splitName[splitName.length - 1];
images.put(name, BitmapFactory.decodeStream(inputStream));
Expand Down
Binary file added sample/src/main/assets/Tests/anim_jpg.zip
Binary file not shown.

0 comments on commit 8d0ea7d

Please sign in to comment.