Welcome to MSDN Blogs Sign in | Join | Help

A million-dollar pen vs. a pencil

You know this legend about how NASA spent millions to develop a pen that can write in zero gravity, and the russians have just used a pencil? Well, I was reminded about this by Dejan’s post in response to my post about the Random Gradient Wallpaper Generator.

I used an O(NxN) algorithm to generate a megapixel image that takes up about 5 MB on my desktop.

Dejan generated a 2x2 bitmap that takes up 70 bytes and let Windows stretch it with the exactly same effect. If you read my original post, go read this one, you’ll like it :)

Published Wednesday, November 04, 2009 7:30 PM by Kirill Osenkov
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: A million-dollar pen vs. a pencil

Wednesday, November 04, 2009 10:36 PM by Jon Galloway

Wow, who knew Windows would stretch it so well! Side note - that million dollar pen thing isn't totally true. http://www.snopes.com/business/genius/spacepen.asp

# re: A million-dollar pen vs. a pencil

Wednesday, November 04, 2009 10:39 PM by fowl

I can't seem to get it to work, no matter what I try I just get 4 coloured boxes...

This is on Windows XP.

# re: A million-dollar pen vs. a pencil

Thursday, November 05, 2009 9:30 AM by Kirill Osenkov

Yeah, it should work on Vista and above. But I mean - the out-of-the-box thinking is awesome!

# re: A million-dollar pen vs. a pencil

Friday, November 06, 2009 2:25 AM by Dejan

Thanks for the follow up post Kiril, glad that you liked the idea

@fowl, I have no problems on Windows XP. I mentioned in my blog post that the image should be a 24bit bmp file and then Windows stretches the wallpaper properly, maybe try that

# re: A million-dollar pen vs. a pencil

Friday, November 06, 2009 3:50 AM by fowl

I'm using a 2x2 24bit bmp, straight from Paint, no less!

:)

Oddness.

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker