Permalink
Browse files

Updates issue 2

Changed calc for opacity to use 2 to power to ensure the opacity halves each time.
  • Loading branch information...
1 parent fc62eb5 commit ec326ba5e26eeebca45275f94b5ff9a5bf656101 chris@cpearson.me.uk committed Apr 21, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 startrail.py
View
@@ -51,7 +51,7 @@ def processDarkFrame(fileName, image, layerCount):
# get the main layer of the new frame
darkLayer = pdb.gimp_layer_new_from_drawable(darkFrame.active_layer, image)
# set the opacity to half that of the one before so we get an average
- darkLayer.opacity = 100.0 / layerCount
+ darkLayer.opacity = 100.0 / pow(2, layerCount - 1)
# add the new layer and flatten down to keep memory useage down.
image.add_layer(darkLayer,0)
image.flatten()

0 comments on commit ec326ba

Please sign in to comment.