June
02
class pixel:
width = 2
height = 2
pixel = [[0,0],[0,0]]
def __init__(self):
pass
def set_width(self,x):
if (x >= self.width):
for list in self.pixel:
for i in range(x - self.width):
list.append(0)
self.width = x
def set_height(self,y):
if (y >= self.height):
temp = []
for i in range(self.width):
temp.append(0)
for i in range(y-self.height):
self.pixel.append(temp)
self.height = y
def get_width(self):
return self.width
def get_height(self):
return self.height
def set_pixel(self,x,y,value):
self.pixel[x][y] = value
def show_pixel(self):
print self.pixel
width = 2
height = 2
pixel = [[0,0],[0,0]]
def __init__(self):
pass
def set_width(self,x):
if (x >= self.width):
for list in self.pixel:
for i in range(x - self.width):
list.append(0)
self.width = x
def set_height(self,y):
if (y >= self.height):
temp = []
for i in range(self.width):
temp.append(0)
for i in range(y-self.height):
self.pixel.append(temp)
self.height = y
def get_width(self):
return self.width
def get_height(self):
return self.height
def set_pixel(self,x,y,value):
self.pixel[x][y] = value
def show_pixel(self):
print self.pixel
if __name__ == "__main__":
p = pixel()
p.set_width(5)
p.set_height(5)
for i in range(4):
for j in range(4):
p.set_pixel(i+1,j+1,i+j)
print p.pixel
p = pixel()
p.set_width(5)
p.set_height(5)
for i in range(4):
for j in range(4):
p.set_pixel(i+1,j+1,i+j)
print p.pixel
03 June 2008, 21:15
Just wanted to point out that now it is possible to highlight the source code.
28 February 2010, 02:08
The Python program Image2Map.py uses this heuristic to create an image of the unique tiles.
09 August 2010, 00:24
My niece was full of joy when reading this line on your blog " " it also bring back to mind about the day I came across my long time friend
get over loser boyfriend
how do you get over an ex
.
09 August 2010, 01:14
My neighbor was laughing when reading this line on your post "" this is it, you just smashed it down buddy
broken heart break up
getting over the ex
.
09 August 2010, 11:02
This can be one of the most powerful discussions I ever read in a long time, I'm speaking about this component of your post " " it also made me think about the day I met my long time friend
affirmations get over break up
ways to get over an ex
.
12 August 2010, 01:25
My son was full of joy when reading this line on your blog "" this is it, you just crushed it down buddy
get over guy ex boyfriend
how to get over you ex
.
18 August 2010, 05:37
Your headline "thinking in python a python program for image model..." analysis is impressive and better than any I have viewed so far.