User Tools

Site Tools


guides:example-programs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
guides:example-programs [2026/03/22 22:56] – [Metrics] osnrguides:example-programs [2026/03/22 22:56] (current) – [Frame image] osnr
Line 20: Line 20:
 </code> </code>
  
-=== Frame image === 
  
-<code> 
-When the camera frame is /im/ { 
-  Wish the web server handles route "/frame-image/$" with handler [list apply {{im} { 
-    set filename "/tmp/web-image-frame.jpg" 
-    image saveAsJpeg $im $filename 
-    set fsize [file size $filename] 
-    set fd [open $filename r] 
-    fconfigure $fd -encoding binary -translation binary 
-    set body [read $fd $fsize] 
-    close $fd 
-    dict create statusAndHeaders "HTTP/1.1 200 OK\nConnection: close\nContent-Type: image/jpeg\nContent-Length: $fsize\n\n" body $body 
-  }} $im] 
-} 
-</code> 
guides/example-programs.txt · Last modified: by osnr

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki