It’s been quite a while since I’ve posted anything, I’ve been very busy lately but since I’m out sick now for a few days, I have a bit of time to update…
If you have tried to play Fallout 3 using an Asus branded NVidia card, and it crashes stating “Fallout 3 has stopped working” every time you try to load a new game, check and see if you have Asus Gamer OSD installed, if you do, get rid of it. Something the overlay does interferes with the game and causes this to happen…
I have been doing some more work on the lighting for the man cave so I have some Python code that will pull the Average color (not the most predominant, yet, wont be hard, but I am lazy) so here it is, please keep in mind its not nice, fast or clean… for high res images it takes a few seconds to do its thing…
#!/usr/bin/env python # # PIL Image Module Handbook - http://www.pythonware.com/library/pil/handbook/image.htm # from PIL import Image from optparse import OptionParser def processImageAverage(imageFile): image = Image.open(imageFile) #open the image for processing pixels = list(image.getdata()) #break the image down into a list of pixels, each pixel contains a list of red,green,blue totalpx = 0 #set some default values to start counting... redpx = 0 greenpx = 0 bluepx = 0 for pixel in pixels: #loop through the lists and build the values. totalpx += 1 redpx += pixel[0] greenpx += pixel[1] bluepx += pixel[2] redavg = redpx / totalpx #generate the averages greenavg = greenpx / totalpx blueavg = bluepx / totalpx print "\nTotal Pixels:\t", totalpx #and write them out. print "Red Average:\t", redavg print "Green Average:\t", greenavg print "Blue Average:\t", blueavg print "HEX Color:\t#%x%x%x" % (redavg, greenavg, blueavg) def main(): parser = OptionParser("Usage: %prog source") (options, arguments) = parser.parse_args() if len(arguments) != 1: parser.error("Please specify a single input file.") processImageAverage(arguments[0]) if __name__ == "__main__": main()
I have a new job now, I’m no longer a software validation engineer (tester), I’m now an IT Support Engineer (IT Techie…) which is kinda nice….
Well… that is for now…