From 10b71e97ac3d7ca9f7b644963fffd37ad7ed3e7e Mon Sep 17 00:00:00 2001 From: T8RIN Date: Wed, 18 Sep 2024 19:06:20 +0300 Subject: [PATCH] fix collages and improve histograms --- .../imageresizershrinker/core/ui/widget/image/ImagePager.kt | 4 ++-- .../feature/filters/presentation/FiltersContent.kt | 4 ++-- .../filters/presentation/components/AddEditMaskSheet.kt | 4 ++-- .../media_picker/presentation/components/MediaPickerGrid.kt | 4 ++-- gradle/libs.versions.toml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/ui/src/main/kotlin/ru/tech/imageresizershrinker/core/ui/widget/image/ImagePager.kt b/core/ui/src/main/kotlin/ru/tech/imageresizershrinker/core/ui/widget/image/ImagePager.kt index de1066086c..ef9556c128 100644 --- a/core/ui/src/main/kotlin/ru/tech/imageresizershrinker/core/ui/widget/image/ImagePager.kt +++ b/core/ui/src/main/kotlin/ru/tech/imageresizershrinker/core/ui/widget/image/ImagePager.kt @@ -88,7 +88,7 @@ import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.IntOffset import androidx.compose.ui.unit.dp -import com.t8rin.histogram.HistogramRGB +import com.t8rin.histogram.ImageHistogram import kotlinx.coroutines.delay import kotlinx.coroutines.launch import net.engawapg.lib.zoomable.rememberZoomState @@ -188,7 +188,7 @@ fun ImagePager( val moreThanOneUri = (uris?.size ?: 0) > 1 val histogram: @Composable () -> Unit = { - HistogramRGB( + ImageHistogram( imageUri = uris?.getOrNull(pagerState.currentPage) ?: Uri.EMPTY, modifier = Modifier .height(50.dp) diff --git a/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/presentation/FiltersContent.kt b/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/presentation/FiltersContent.kt index 6c04326b88..7569456cfd 100644 --- a/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/presentation/FiltersContent.kt +++ b/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/presentation/FiltersContent.kt @@ -96,7 +96,7 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.t8rin.dynamic.theme.LocalDynamicThemeState import com.t8rin.dynamic.theme.rememberAppColorTuple -import com.t8rin.histogram.HistogramRGB +import com.t8rin.histogram.ImageHistogram import dev.olshevski.navigation.reimagined.hilt.hiltViewModel import kotlinx.coroutines.delay import kotlinx.coroutines.launch @@ -474,7 +474,7 @@ fun FiltersContent( title = stringResource(R.string.histogram), subtitle = stringResource(R.string.histogram_sub), endIcon = { - HistogramRGB( + ImageHistogram( image = viewModel.previewBitmap, modifier = Modifier .width(100.dp) diff --git a/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/presentation/components/AddEditMaskSheet.kt b/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/presentation/components/AddEditMaskSheet.kt index 633f3dc7c0..47a6926f4f 100644 --- a/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/presentation/components/AddEditMaskSheet.kt +++ b/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/presentation/components/AddEditMaskSheet.kt @@ -76,7 +76,7 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.zIndex import androidx.exifinterface.media.ExifInterface import androidx.lifecycle.viewModelScope -import com.t8rin.histogram.HistogramRGB +import com.t8rin.histogram.ImageHistogram import dagger.hilt.android.lifecycle.HiltViewModel import net.engawapg.lib.zoomable.rememberZoomState import ru.tech.imageresizershrinker.core.domain.dispatchers.DispatchersHolder @@ -397,7 +397,7 @@ fun AddEditMaskSheet( title = stringResource(R.string.histogram), subtitle = stringResource(R.string.histogram_sub), endIcon = { - HistogramRGB( + ImageHistogram( image = viewModel.previewBitmap, modifier = Modifier .width(100.dp) diff --git a/feature/media-picker/src/main/java/ru/tech/imageresizershrinker/feature/media_picker/presentation/components/MediaPickerGrid.kt b/feature/media-picker/src/main/java/ru/tech/imageresizershrinker/feature/media_picker/presentation/components/MediaPickerGrid.kt index f223df8375..b9a2ff0f4f 100644 --- a/feature/media-picker/src/main/java/ru/tech/imageresizershrinker/feature/media_picker/presentation/components/MediaPickerGrid.kt +++ b/feature/media-picker/src/main/java/ru/tech/imageresizershrinker/feature/media_picker/presentation/components/MediaPickerGrid.kt @@ -105,7 +105,7 @@ import androidx.compose.ui.unit.IntOffset import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.core.net.toUri -import com.t8rin.histogram.HistogramRGB +import com.t8rin.histogram.ImageHistogram import com.t8rin.modalsheet.FullscreenPopup import kotlinx.coroutines.delay import kotlinx.coroutines.launch @@ -385,7 +385,7 @@ fun MediaPickerGrid( val moreThanOneUri = state.media.size > 1 val currentMedia = state.media.getOrNull(pagerState.currentPage) val histogram: @Composable () -> Unit = { - HistogramRGB( + ImageHistogram( imageUri = currentMedia?.uri?.toUri() ?: Uri.EMPTY, modifier = Modifier .height(50.dp) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8e23cf0224..57d39fad30 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -9,7 +9,7 @@ versionCode = "153" jvmTarget = "17" compose-compiler = "1.5.15" -imageToolboxLibs = "2.6.8" +imageToolboxLibs = "2.7.0" trickle = "1.1.2" avifCoder = "1.8.0"