mirror of
https://github.com/nikdoof/oblogout.git
synced 2025-12-21 22:39:25 +00:00
Darken the image in rendering mode, set the default opacity to 70%
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user