diff --git a/landscapist-palette/src/commonMain/kotlin/com/skydoves/landscapist/palette/PalettePlugin.kt b/landscapist-palette/src/commonMain/kotlin/com/skydoves/landscapist/palette/PalettePlugin.kt index 48188417..66cef1e4 100644 --- a/landscapist-palette/src/commonMain/kotlin/com/skydoves/landscapist/palette/PalettePlugin.kt +++ b/landscapist-palette/src/commonMain/kotlin/com/skydoves/landscapist/palette/PalettePlugin.kt @@ -19,6 +19,7 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.Immutable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.ImageBitmap +import androidx.compose.ui.platform.LocalInspectionMode import com.skydoves.landscapist.ImageOptions import com.skydoves.landscapist.plugins.ImagePlugin @@ -53,6 +54,8 @@ public data class PalettePlugin( imageBitmap: ImageBitmap?, ): ImagePlugin = apply { + if (LocalInspectionMode.current) return@apply + imageBitmap?.let { bitmapPalette.applyImageModel(this.imageModel ?: imageModel) bitmapPalette.generate(it)