From 6ff20f527e54627351f4c919d60d4bd94bae3b22 Mon Sep 17 00:00:00 2001 From: Edwin Jakobs Date: Tue, 4 Aug 2020 09:01:25 +0200 Subject: [PATCH] [orx-boofcv] make demo quit on G/A --- orx-boofcv/src/demo/kotlin/DemoResize01.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/orx-boofcv/src/demo/kotlin/DemoResize01.kt b/orx-boofcv/src/demo/kotlin/DemoResize01.kt index cd5991c4..5c8fdc1b 100644 --- a/orx-boofcv/src/demo/kotlin/DemoResize01.kt +++ b/orx-boofcv/src/demo/kotlin/DemoResize01.kt @@ -2,11 +2,18 @@ import org.openrndr.application import org.openrndr.boofcv.binding.* import org.openrndr.color.ColorRGBa import org.openrndr.draw.loadImage +import org.openrndr.extensions.SingleScreenshot fun main() { application { program { + if (System.getProperty("takeScreenshot") == "true") { + extend(SingleScreenshot()) { + this.outputFile = System.getProperty("screenshotPath") + } + } + // Load an image, convert to BoofCV format using orx-boofcv val input = loadImage("demo-data/images/image-001.png").toPlanarU8()