import Image

def LSB(b):
        
        b = str(bin(b))[-1:]
        if(b == "1"):
                return 0
        else:
                return 255
        
image = Image.open("image")
out = image.copy()
out = image.convert('RGB')
out.putdata( [(LSB(r), LSB(g), LSB(b))
                for r, g, b in out.getdata()] )

out.save("LSB.bmp")
fcda708bbc852f31d3bb3a16ca7b76f5b8929369
<mask token>


def LSB(b):
    b = str(bin(b))[-1:]
    if b == '1':
        return 0
    else:
        return 255


<mask token>

<mask token>


def LSB(b):
    b = str(bin(b))[-1:]
    if b == '1':
        return 0
    else:
        return 255


<mask token>
out.putdata([(LSB(r), LSB(g), LSB(b)) for r, g, b in out.getdata()])
out.save('LSB.bmp')

<mask token>


def LSB(b):
    b = str(bin(b))[-1:]
    if b == '1':
        return 0
    else:
        return 255


image = Image.open('image')
out = image.copy()
out = image.convert('RGB')
out.putdata([(LSB(r), LSB(g), LSB(b)) for r, g, b in out.getdata()])
out.save('LSB.bmp')

import Image


def LSB(b):
    b = str(bin(b))[-1:]
    if b == '1':
        return 0
    else:
        return 255


image = Image.open('image')
out = image.copy()
out = image.convert('RGB')
out.putdata([(LSB(r), LSB(g), LSB(b)) for r, g, b in out.getdata()])
out.save('LSB.bmp')

import Image

def LSB(b):
        
        b = str(bin(b))[-1:]
        if(b == "1"):
                return 0
        else:
                return 255
        
image = Image.open("image")
out = image.copy()
out = image.convert('RGB')
out.putdata( [(LSB(r), LSB(g), LSB(b))
                for r, g, b in out.getdata()] )

out.save("LSB.bmp")