Comment 2 for bug 384420

Revision history for this message
Stani (stani) wrote :

Thanks for the fix!

$ bzr diff
=== modified file 'phatch/actions/reflection.py'
--- phatch/actions/reflection.py 2009-06-08 12:17:51 +0000
+++ phatch/actions/reflection.py 2009-06-09 22:52:15 +0000
@@ -58,8 +58,8 @@
         resample_shadow,gap=0,scale=False,cache=None):
     if cache is None:
         cache = {}
- opacity = int(2.55*opacity)
- background_opacity = int(2.55*background_opacity)
+ opacity = (255 * opacity) / 100
+ background_opacity = (255 * background_opacity) / 100
     resample_shadow = getattr(Image,resample_shadow)
     if background_opacity == 255:
         mode = 'RGB'

$ bzr commit -m "fix reflection"
Committing to: /home/stani/sync/python/phatch/trunk/
modified phatch/actions/reflection.py
Committed revision 715.