This repository was archived by the owner on Feb 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
library/src/main/java/com/opensource/svgaplayer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,9 +94,16 @@ class SVGAVideoEntity {
9494 if (bitmap != null ) {
9595 images.put(imageKey, bitmap)
9696 } else {
97- (cacheDir.absolutePath + " /" + imageKey + " .png" ).takeIf { File (it).exists() }?.let {
98- BitmapFactory .decodeFile(it, options)?.let {
99- images.put(imageKey, it)
97+ // bitmap.matte : bitmap
98+ var filePath = cacheDir.absolutePath + " /" + imgObjects[imageKey] + " .png"
99+ var bitmap = if (File (filePath).exists()) BitmapFactory .decodeFile(filePath, options) else null
100+ if (bitmap != null ) {
101+ images.put(imageKey, bitmap)
102+ } else {
103+ (cacheDir.absolutePath + " /" + imageKey + " .png" ).takeIf { File (it).exists() }?.let {
104+ BitmapFactory .decodeFile(it, options)?.let {
105+ images.put(imageKey, it)
106+ }
100107 }
101108 }
102109 }
You can’t perform that action at this time.
0 commit comments