mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 02:34:39 +00:00
fix: staggered grid cover being squashed for local source (#398)
* fix: cover ratio NaN for local source * unused * Update CHANGELOG.md
This commit is contained in:
parent
f035454150
commit
2b2e0491e8
2 changed files with 8 additions and 2 deletions
|
@ -66,7 +66,12 @@ object MangaCoverMetadata {
|
|||
} else {
|
||||
options.inSampleSize = 4
|
||||
}
|
||||
val bitmap = BitmapFactory.decodeFile(file.filePath, options)
|
||||
val bitmap = try {
|
||||
val stream = file.openInputStream()
|
||||
BitmapFactory.decodeStream(stream, null, options)
|
||||
} catch (_: Throwable) {
|
||||
null
|
||||
}
|
||||
if (bitmap != null) {
|
||||
Palette.from(bitmap).generate { palette ->
|
||||
if (isInLibrary) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue