Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3517371

Browse files
committed
Added jpeg grabber
1 parent a1e1f73 commit 3517371

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Demo/sgi/video/VGrabber.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ def grab_hsv(w, h, pf):
7171
raise Error, 'Sorry, grabbing hsv not implemented'
7272

7373
def grab_jpeg(w, h, pf):
74-
# XXX Ought to grab rgb and compress it
75-
raise Error, 'sorry, grabbing jpeg not implemented'
74+
data, dummy = grab_rgb(w, h, pf)
75+
import jpeg
76+
data = jpeg.compress(data, w, h, 4)
77+
return data, None
7678

7779
def grab_jpeggrey(w, h, pf):
7880
raise Error, 'sorry, grabbing jpeggrey not implemented'

0 commit comments

Comments
 (0)