From 47c4e81420f0b84fc3b0a6fb5a3dc394de2b39ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Cuervo?= Date: Thu, 2 Feb 2023 17:24:03 -0500 Subject: Add kiss fft reference, remove im from virtual programs --- virtual-programs/im.folk | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 virtual-programs/im.folk (limited to 'virtual-programs') diff --git a/virtual-programs/im.folk b/virtual-programs/im.folk deleted file mode 100644 index 83f7b503..00000000 --- a/virtual-programs/im.folk +++ /dev/null @@ -1,44 +0,0 @@ -Wish $this has filename "im.folk" -return -if {$::isLaptop} { return } - -Wish $this is outlined green - -set cc [c create] -source "pi/cUtils.tcl" -defineImageType $cc - -$cc include -$cc include -$cc proc bw {image_t im} image_t { - image_t ret; - ret.width = im.width; - ret.height = im.height; - ret.components = 3; - ret.bytesPerRow = ret.width * ret.components; - ret.data = calloc(ret.bytesPerRow, ret.height); - - for (uint32_t y = 0; y < im.height; ++y) { - int R = 0; int G = 1; int B = 2; - for (uint32_t x = 0; x < im.width; ++x) { - int i = y * ret.bytesPerRow + x * ret.components; - int j = y * im.bytesPerRow + x * im.components; - ret.data[i + 0] = im.data[j + R]; - ret.data[i + 1] = im.data[j + G]; - ret.data[i + 2] = im.data[j + B]; - } - } - - return ret; -} -$cc proc freeImage {image_t im} void { free(im.data); } -$cc compile - -Wish $this has camera image -When $this has camera image /im/ { - When $this has region /r/ { - set bwim [bw $im] - Wish display runs [list Display::image {*}[lindex $r 0 0] $bwim] - On unmatch [list WhenContext::freeImage $bwim] - } -} \ No newline at end of file -- cgit v1.2.3