Permalink
Browse files

fixed script to ignore the alpha channel for the mask

  • Loading branch information...
1 parent 46408d3 commit a03216232af817dd0504cf0f576f3be05b25ed8f @hamstah committed Mar 19, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 tools/extract-pixels.py
View
@@ -7,7 +7,7 @@
class Extractor:
- def __init__(self, mask_color = (0,0,0,255)):
+ def __init__(self, mask_color = (0,0,0)):
self.mask_color = mask_color
def save(self, pixels, filename):
@@ -32,7 +32,7 @@ def extract(self, filename):
for x in range(width):
for y in range(height):
cpixel = pixels[x, y]
- if cpixel != self.mask_color:
+ if cpixel[0:3] != self.mask_color:
valid_pixels.append(cpixel)
return valid_pixels

0 comments on commit a032162

Please sign in to comment.