Long strip split fixes (#7875)

* Fix image width in `splitStrip`

* Fix reader switch isn't in md3
This commit is contained in:
AntsyLich 2022-08-28 04:10:16 +06:00 committed by GitHub
parent 9c49a5ed22
commit 1948d55d5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -282,7 +282,7 @@ object ImageUtil {
val options = extractImageOptions(imageStream).apply { inJustDecodeBounds = false } val options = extractImageOptions(imageStream).apply { inJustDecodeBounds = false }
val region = Rect(0, splitData.topOffset, splitData.outputImageHeight, splitData.bottomOffset) val region = Rect(0, splitData.topOffset, options.outWidth, splitData.bottomOffset)
try { try {
val splitBitmap = bitmapRegionDecoder.decodeRegion(region, options) val splitBitmap = bitmapRegionDecoder.decodeRegion(region, options)

View file

@ -66,7 +66,7 @@
android:visibility="gone" android:visibility="gone"
tools:visibility="visible" /> tools:visibility="visible" />
<com.google.android.material.switchmaterial.SwitchMaterial <com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/long_strip_split" android:id="@+id/long_strip_split"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"