Skip to content

Commit 8abb7c4

Browse files
committed
Upgraded to 2.0.2
1 parent c2cf885 commit 8abb7c4

File tree

3 files changed

+32
-15
lines changed

3 files changed

+32
-15
lines changed

app/src/main/java/com/awxkee/avif/coil/MainActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ class MainActivity : AppCompatActivity() {
2727
.newBuilder()
2828
.logger(DebugLogger())
2929
.components {
30-
add(AnimatedAvifDecoder.Factory(preheatFrames = 2))
30+
add(AnimatedAvifDecoder.Factory(preheatFrames = 5))
3131
}
32-
.bitmapConfig(Bitmap.Config.RGBA_1010102)
32+
.bitmapConfig(Bitmap.Config.ARGB_8888)
3333
.build()
3434
)
3535
}

avifcoillibrary/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ afterEvaluate {
1515
create<MavenPublication>("mavenJava") {
1616
groupId = "com.github.awxkee"
1717
artifactId = "avif-coder-coil"
18-
version = "2.0.1"
18+
version = "2.0.2"
1919
from(components.findByName("release"))
2020
// artifact("androidSourcesJar")
2121
}
@@ -64,5 +64,5 @@ dependencies {
6464
androidTestImplementation("androidx.test.ext:junit:1.1.5")
6565
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
6666
api("io.coil-kt:coil:2.7.0")
67-
api("com.github.awxkee:avif-coder:2.0.1")
67+
api("com.github.awxkee:avif-coder:2.0.2")
6868
}

avifcoillibrary/src/main/java/com/github/awxkee/avifcoil/decoder/animation/AnimatedAvifDecoder.kt

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,33 @@
1-
package com.github.awxkee.avifcoil.decoder.animation
1+
/*
2+
* MIT License
3+
*
4+
* Copyright (c) 2024 Radzivon Bartoshyk
5+
* jxl-coder [https://github.com/awxkee/jxl-coder]
6+
*
7+
* Created by Radzivon Bartoshyk on 9/3/2024
8+
*
9+
* Permission is hereby granted, free of charge, to any person obtaining a copy
10+
* of this software and associated documentation files (the "Software"), to deal
11+
* in the Software without restriction, including without limitation the rights
12+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
* copies of the Software, and to permit persons to whom the Software is
14+
* furnished to do so, subject to the following conditions:
15+
*
16+
* The above copyright notice and this permission notice shall be included in all
17+
* copies or substantial portions of the Software.
18+
*
19+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25+
* SOFTWARE.
26+
*
27+
*/
228

29+
package com.github.awxkee.avifcoil.decoder.animation
330

4-
import android.annotation.SuppressLint
531
import android.graphics.Bitmap
632
import android.graphics.drawable.BitmapDrawable
733
import android.graphics.drawable.Drawable
@@ -149,13 +175,4 @@ public class AnimatedAvifDecoder(
149175
}
150176
}
151177

152-
@SuppressLint("ObsoleteSdkInt")
153-
companion object {
154-
init {
155-
if (Build.VERSION.SDK_INT >= 24) {
156-
System.loadLibrary("coder")
157-
}
158-
}
159-
}
160-
161178
}

0 commit comments

Comments
 (0)