#4576 BLOC Update.: taking a screenshot in joyride takes much longer than before

Zarro Boogs per Child bugtracker at laptop.org
Wed Oct 31 17:06:28 EDT 2007


#4576: taking a screenshot in joyride takes much longer than before
------------------------------+---------------------------------------------
  Reporter:  tomeu            |       Owner:  bernie   
      Type:  defect           |      Status:  new      
  Priority:  blocker          |   Milestone:  Update.1 
 Component:  x window system  |     Version:           
Resolution:                   |    Keywords:  update.1?
  Verified:  0                |  
------------------------------+---------------------------------------------

Comment(by tomeu):

 The following code is faster: 0.34s. Not sure it's fast enough, though.
 {{{
 def _get_from_image(window):
     width, height = window.get_size()
     image = window.get_image(0, 0, width, height)
     screenshot = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, has_alpha=False,
                                 bits_per_sample=8, width=width,
 height=height)
     screenshot.get_from_image(image, window.get_colormap(), 0, 0, 0, 0,
                               width, height)
     del screenshot
 }}}

-- 
Ticket URL: <https://dev.laptop.org/ticket/4576#comment:3>
One Laptop Per Child <https://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list