diff --git a/ctdo.png b/ctdo.png index 3a98812..3b12e1c 100644 Binary files a/ctdo.png and b/ctdo.png differ diff --git a/eh18-image.py b/eh18-image.py index f311bdb..6432f1c 100644 --- a/eh18-image.py +++ b/eh18-image.py @@ -33,7 +33,7 @@ def randomnumber(pseed,pmin,pmax,v1,v2,v3): newseed=(int)(time.time()/60) seed=newseed -parts=4 #n users +parts=2 #n users user=1 #1..n if __name__ == '__main__': @@ -60,8 +60,8 @@ if __name__ == '__main__': #xv=random.randint(width/2,flutwidth-width/2) #yv=random.randint(height/2,flutheight-height/2) - xv=randomnumber(seed,width/2,flutwidth-width/2, 1234,-242,4) - yv=randomnumber(seed,height/2,flutheight-height/2, 1423,-122,3) + xv=randomnumber(seed,width/2,flutwidth-width/2, 42,-24,4) + yv=randomnumber(seed,height/2,flutheight-height/2, 43,-23,3) print("xv="+str(xv)+ "yv="+str(yv)) _current_command="" @@ -72,12 +72,13 @@ if __name__ == '__main__': for i,j in pixelcoords: r, g, b,a = rgb_im.getpixel((i, j)) - if a!=255: + if a<=127: continue #if r>127: # continue #skip bright pixels #r=255-r + #_current_command+='PX %d %d %02x%02x%02x\n' % (i+xv,j+yv,r,g,b) #rgb _current_command+='PX %d %d %02x\n' % (i+xv-width/2,j+yv-height/2,r) #monochrome only red channel if len(_current_command)>=1400: