Pixel PNG

I have been trying (not to hard) to find a way to generate one pixel by one pixel images (png) for a large number of colors. I made up a few by hand in Gimp but there was no way I was going to do that for hundreds... so last night I stumbled across PNGwriter. Oh, just what the doctor (makefile) ordered. I hacked on it a bit while watching tv last night and now I have a quick little program for generating pixels. Not overly clean but it does the job. Why you ask? Well I have these 1x1 pixels as my screen saver, so when my little one sees the screen she calls out the colors... she loves it and it helps us teach her colors.

Offer up your ideas on generating 1x1 pixel images as well or even code snips of using the pngwriter library.

For what it's worth.

Comments:

hi
Continued to write
http://www.w3village.com
best regard

Posted by alireda on December 08, 2006 at 08:20 AM EST #

See this? http://davidnaylor.org/blog/2005/02/all-16777216-rgb-colours.html

Posted by Toby on December 08, 2006 at 10:34 AM EST #

Toby, awesome, I did not catch that when it was on digg. Those are awesome graphics.

Posted by Dan Lacher on December 08, 2006 at 11:31 AM EST #

Hi! I check PNGwriter's website's referrers, and I came across your blog post. I'm glad you found it usefu; it's always great to hear that. You might want to use the HSV colourspace to generate your images; that way you can generate pixels with their colour equally spaced around the colour wheel. Anyway, cheers and have fun! Paul

Posted by Paul Blackburn on December 09, 2006 at 03:23 AM EST #

You might also try ImageMagick. The 'convert' utility will take an image and transform it using the scripting language, and generate a new file with the desired properties. See: http://www.imagemagick.org/script/index.php \*Way\* too much fun with images. Like a flamethrower when you need a match. Have fun.

Posted by noyb on December 09, 2006 at 11:36 AM EST #

Do the images need to be png? ppm is so much easier to generate (and then you can convert it using imagemagick for instance), it is just a text file: P3 1 1 255 255 0 0 (this is for red, 1 and 1 are the dimensions, 255 the max value, and the last are the r g and b components)

Posted by Marc on December 10, 2006 at 04:54 AM EST #

As Paul said, the 'convert' utility in ImageMagick can do this. Just run convert "XC:#00ff00" -size 1x1 colour.png and change as required

Posted by Chris on December 10, 2006 at 10:29 AM EST #

Post a Comment:
Comments are closed for this entry.
About

dlacher

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today