diff --git a/app/src/main/assets/augmented_image_target.jpg b/app/src/main/assets/augmented_image_target.jpg new file mode 100644 index 0000000..d324166 Binary files /dev/null and b/app/src/main/assets/augmented_image_target.jpg differ diff --git a/app/src/main/assets/augmented_image_target.png b/app/src/main/assets/augmented_image_target.png deleted file mode 100644 index 7bdd5de..0000000 Binary files a/app/src/main/assets/augmented_image_target.png and /dev/null differ diff --git a/app/src/main/java/fr/smarquis/ar_toolbox/Nodes.kt b/app/src/main/java/fr/smarquis/ar_toolbox/Nodes.kt index 7f0468d..99e9599 100644 --- a/app/src/main/java/fr/smarquis/ar_toolbox/Nodes.kt +++ b/app/src/main/java/fr/smarquis/ar_toolbox/Nodes.kt @@ -541,7 +541,7 @@ class Augmented( private val references: MutableMap = mutableMapOf() fun target(context: Context) = try { - context.applicationContext.assets.open("augmented_image_target.png") + context.applicationContext.assets.open("augmented_image_target.jpg") } catch (e: Exception) { null }?.let { BitmapFactory.decodeStream(it) } diff --git a/app/src/main/java/fr/smarquis/ar_toolbox/SceneActivity.kt b/app/src/main/java/fr/smarquis/ar_toolbox/SceneActivity.kt index a42b176..843afff 100644 --- a/app/src/main/java/fr/smarquis/ar_toolbox/SceneActivity.kt +++ b/app/src/main/java/fr/smarquis/ar_toolbox/SceneActivity.kt @@ -129,7 +129,9 @@ class SceneActivity : ArActivity(ActivitySceneBinding::inf updateMode = UpdateMode.LATEST_CAMERA_IMAGE cloudAnchorMode = CloudAnchorMode.ENABLED augmentedImageDatabase = AugmentedImageDatabase(session).apply { - Augmented.target(this@SceneActivity)?.let { addImage("augmented", it) } + Augmented.target(this@SceneActivity) + ?.runCatching { addImage("augmented", this) } + ?.onFailure(Throwable::printStackTrace) // Might throw ImageInsufficientQualityException } augmentedFaceMode = AugmentedFaceMode.DISABLED focusMode = FocusMode.AUTO