Darken the image in rendering mode, set the default opacity to 70%

This commit is contained in:
Andrew Williams
2009-01-19 22:07:52 +00:00
parent 86c928e35f
commit f6ff7cc9ef
2 changed files with 4 additions and 5 deletions

View File

@@ -99,13 +99,12 @@ class OpenboxLogout():
pb = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,False,8,sz[0],sz[1])
pb = pb.get_from_drawable(w,w.get_colormap(),0,0,0,0,sz[0],sz[1])
self.logger.debug("Rendering Blur")
self.logger.debug("Rendering Fade")
# Convert Pixbuf to PIL Image
wh = (pb.get_width(),pb.get_height())
pilimg = Image.fromstring("RGB", wh, pb.get_pixels())
# Blur the image
pilimg = pilimg.filter(ImageFilter.BLUR)
pilimg = pilimg.point(lambda p: p * self.opacity / 100)
# "Convert" the PIL to Pixbuf via PixbufLoader
buf = StringIO.StringIO()