Charlie's Blog #134: Augh! Now he's writing software to make the pictures!

Augh! Now he's writing software to make the pictures!

9/21/05
It's true. I have ideas that I feel like I could execute more effectively programatically, that is by writing programs to do them, than doing them by hand in paint. All I have to do is figure out the internals of bitmaps (.bmp files) first. I'm not there yet, but I am writing valid bmp files. It's like I've discovered all these new artistic super powers, and like every young superhero in a comic book, I first have to learn to control them! So, what that means is none of what follows was done intentionally! ;-) These are all cool lookin' by-products of me trying to figure out the guts of bitmap files.

I'm writing Ruby scripts to do these. The following Ruby script creates the small, 320x240 image that follows the listing. Then I took several of the more cool lookin' ones, imho, copied them in paint, flipped them around, lined them up and then had the effrontery to call what follows "art." So if you like any of these, it'll probably depend on which colors and combinations you like, and those were pretty much chosen by accident (except the black one), or you could say by the computer.

# cea, 9/21/05
infile = File.open("orange.bmp", "r")
outfile = File.open("a19.bmp", "w")

base = 0
a = base
a_reset = 105
space = 125
factor = 1

while(!infile.eof) 
	inbyte = infile.getc
	if (inbyte == 64) then		# 64, 128, 255 is orange
		byte2 = infile.getc
		byte3 = infile.getc
		if (byte2 == 128) && (byte3 == 255) then
			if (a > a_reset) then a = base end
			inbyte = space + a
			byte2 = (space*2) + a
			byte3 = (space*3) + a
			a += factor
		end
		outfile.putc inbyte
		outfile.putc byte2
		outfile.putc byte3
	else
		outfile.putc inbyte
	end
end

infile.close
outfile.close

Which produces:

From which I made:

And everything else was made by messing with the code above. I like all the subtle gradations in these.

These last two are kind of busy...

How do ya like them apples? :-)





Gallery
Home