snippets

Check-in [060fddcbca]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:tclwmf webcam image capture
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 060fddcbca2aa80a6b43bdbb00359c219e183992be8d9ccc27ff9c2c52543500
User & Date: alex 2019-06-27 14:51:17
Context
2019-06-27
14:55
tdom xpath search example 1 check-in: 3435a354be user: alex tags: trunk
14:51
tclwmf webcam image capture check-in: 060fddcbca user: alex tags: trunk
2019-05-10
06:17
GT06 GPS Tracker Protocol check-in: a955298db5 user: alex tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added webcam/tclwmf.tcl.

































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package require tclwmf
package require Img

set save 0
set count 0

proc cb { args } {
  global cam img count save
  
  incr count
  wmf image $cam $img
  if {$save} {
     $img write webcam.png -format png
     set save 0
  }
}

set img [image create photo]
set dev0 [lindex [wmf devices] 0]
set cam [wmf open $dev0 cb]

label .img -image $img
pack .img
entry .cnt -textvariable count -state readonly
pack .cnt
button .start -text Start -command [subst {set count 0; wmf start $cam}]
button .stop -text Stop -command [subst {wmf stop $cam}]
button .save -text Save -command {set ::save 1}
pack .start -side left
pack .stop -side left
pack .save -side left