mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-23 13:45:43 +03:00
Added another image decoder. It should be faster than Rapid and more reliable than Skia.
This commit is contained in:
parent
5b1f4f189b
commit
52e1e93f9d
6 changed files with 17 additions and 12 deletions
|
@ -93,7 +93,7 @@ android {
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
// Modified dependencies
|
// Modified dependencies
|
||||||
compile 'com.github.inorichi:subsampling-scale-image-view:a2a14ef'
|
compile 'com.github.inorichi:subsampling-scale-image-view:96d2c7f'
|
||||||
compile 'com.github.inorichi:ReactiveNetwork:69092ed'
|
compile 'com.github.inorichi:ReactiveNetwork:69092ed'
|
||||||
|
|
||||||
// Android support library
|
// Android support library
|
||||||
|
@ -108,7 +108,7 @@ dependencies {
|
||||||
|
|
||||||
compile 'com.android.support:multidex:1.0.1'
|
compile 'com.android.support:multidex:1.0.1'
|
||||||
|
|
||||||
compile 'com.google.android.gms:play-services-gcm:9.6.1'
|
compile 'com.google.android.gms:play-services-gcm:9.8.0'
|
||||||
|
|
||||||
// ReactiveX
|
// ReactiveX
|
||||||
compile 'io.reactivex:rxandroid:1.2.1'
|
compile 'io.reactivex:rxandroid:1.2.1'
|
||||||
|
|
|
@ -24,6 +24,11 @@ abstract class BaseReader : BaseFragment() {
|
||||||
* Skia decoder.
|
* Skia decoder.
|
||||||
*/
|
*/
|
||||||
const val SKIA_DECODER = 1
|
const val SKIA_DECODER = 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Image decoder.
|
||||||
|
*/
|
||||||
|
const val IMAGE_DECODER = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -201,12 +206,16 @@ abstract class BaseReader : BaseFragment() {
|
||||||
fun setDecoderClass(value: Int) {
|
fun setDecoderClass(value: Int) {
|
||||||
when (value) {
|
when (value) {
|
||||||
RAPID_DECODER -> {
|
RAPID_DECODER -> {
|
||||||
regionDecoderClass = RapidImageRegionDecoder::class.java
|
|
||||||
bitmapDecoderClass = RapidImageDecoder::class.java
|
bitmapDecoderClass = RapidImageDecoder::class.java
|
||||||
|
regionDecoderClass = RapidImageRegionDecoder::class.java
|
||||||
}
|
}
|
||||||
SKIA_DECODER -> {
|
SKIA_DECODER -> {
|
||||||
regionDecoderClass = SkiaImageRegionDecoder::class.java
|
|
||||||
bitmapDecoderClass = SkiaImageDecoder::class.java
|
bitmapDecoderClass = SkiaImageDecoder::class.java
|
||||||
|
regionDecoderClass = SkiaImageRegionDecoder::class.java
|
||||||
|
}
|
||||||
|
IMAGE_DECODER -> {
|
||||||
|
bitmapDecoderClass = IImageDecoder::class.java
|
||||||
|
regionDecoderClass = IImageRegionDecoder::class.java
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,8 +114,6 @@
|
||||||
<string name="vertical_viewer">Vertical</string>
|
<string name="vertical_viewer">Vertical</string>
|
||||||
<string name="webtoon_viewer">Webtoon</string>
|
<string name="webtoon_viewer">Webtoon</string>
|
||||||
<string name="pref_image_decoder">Decodificador de imagen</string>
|
<string name="pref_image_decoder">Decodificador de imagen</string>
|
||||||
<string name="rapid_decoder">Rapid</string>
|
|
||||||
<string name="skia_decoder">Skia</string>
|
|
||||||
<string name="pref_image_scale_type">Tipo de escalado</string>
|
<string name="pref_image_scale_type">Tipo de escalado</string>
|
||||||
<string name="scale_type_fit_screen">Ajustar a la pantalla</string>
|
<string name="scale_type_fit_screen">Ajustar a la pantalla</string>
|
||||||
<string name="scale_type_stretch">Estirado</string>
|
<string name="scale_type_stretch">Estirado</string>
|
||||||
|
|
|
@ -119,8 +119,6 @@
|
||||||
<string name="vertical_viewer">Vertical</string>
|
<string name="vertical_viewer">Vertical</string>
|
||||||
<string name="webtoon_viewer">Webtoon</string>
|
<string name="webtoon_viewer">Webtoon</string>
|
||||||
<string name="pref_image_decoder">Descodificador de imagem</string>
|
<string name="pref_image_decoder">Descodificador de imagem</string>
|
||||||
<string name="rapid_decoder">Rapid</string>
|
|
||||||
<string name="skia_decoder">Skia</string>
|
|
||||||
<string name="pref_image_scale_type">Tipo de escala</string>
|
<string name="pref_image_scale_type">Tipo de escala</string>
|
||||||
<string name="scale_type_fit_screen">Ajustar ao ecrã</string>
|
<string name="scale_type_fit_screen">Ajustar ao ecrã</string>
|
||||||
<string name="scale_type_stretch">Esticar</string>
|
<string name="scale_type_stretch">Esticar</string>
|
||||||
|
|
|
@ -67,13 +67,15 @@
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="image_decoders">
|
<string-array name="image_decoders">
|
||||||
<item>@string/rapid_decoder</item>
|
<item>Rapid</item>
|
||||||
<item>@string/skia_decoder</item>
|
<item>Skia</item>
|
||||||
|
<item>Image</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="image_decoders_values">
|
<string-array name="image_decoders_values">
|
||||||
<item>0</item>
|
<item>0</item>
|
||||||
<item>1</item>
|
<item>1</item>
|
||||||
|
<item>2</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="image_scale_type">
|
<string-array name="image_scale_type">
|
||||||
|
|
|
@ -123,8 +123,6 @@
|
||||||
<string name="vertical_viewer">Vertical</string>
|
<string name="vertical_viewer">Vertical</string>
|
||||||
<string name="webtoon_viewer">Webtoon</string>
|
<string name="webtoon_viewer">Webtoon</string>
|
||||||
<string name="pref_image_decoder">Image decoder</string>
|
<string name="pref_image_decoder">Image decoder</string>
|
||||||
<string name="rapid_decoder">Rapid</string>
|
|
||||||
<string name="skia_decoder">Skia</string>
|
|
||||||
<string name="pref_image_scale_type">Scale type</string>
|
<string name="pref_image_scale_type">Scale type</string>
|
||||||
<string name="scale_type_fit_screen">Fit screen</string>
|
<string name="scale_type_fit_screen">Fit screen</string>
|
||||||
<string name="scale_type_stretch">Stretch</string>
|
<string name="scale_type_stretch">Stretch</string>
|
||||||
|
|
Loading…
Reference in a new issue