Open-source program for cross-stitch charts

Discuss how you complete your crafts...
Post Reply
ScienceDad
Rank 4 - Raccoon Mario
Rank 4 - Raccoon Mario
Posts: 105
Joined: Thu Sep 23, 2010 10:41 pm

Open-source program for cross-stitch charts

Post by ScienceDad »

Hi folks,

I usually build sprite patterns in a rasterized graphics editor (GraphicConverter) where it's easy to tinker with things at the pixel level. However, I usually end up printing out the pattern and it can be difficult to distinguish individual pixels at that level. Plus, pixels tend to get washed out when I zoom up the image to fill up the printed page. So I thought I'd put my programming skills to use and wrote a quick little Python script (it makes use of some source code published under the MIT license; http://code.google.com/p/pypng) that will take a PNG pixel image and convert it into a PostScript image where each pixel has been blown up into a big fat square. Each of these squares are separated from all the others by a short distance. Because it's a vector-based image, you can zoom in as much as you like and the squares will remain crisp and solid colour.

Here's a set of before and after examples (featuring Kim Pine from Scott Pilgrim vs. The World - my own pattern, if you want to see the completed cross stitch check out the stitch board!):

BEFORE
Before
Before
kimpine.png (1.7 KiB) Viewed 3951 times
AFTER (note that I've converted the PostScript to PDF and then to PNG for posting)
After
After
kimpine_from_pdf.png (13.04 KiB) Viewed 3953 times
and here's the script:

Code: Select all

import sys, png
# first command-line argument contains file name of PNG
infile = open(sys.argv[1])
pr = png.Reader(infile)

ncol, nrow, imap, stats = pr.read()

print '%!PS\n<< /PageSize ['+str(13*ncol+20)+' '+str(13*nrow+20)+'] >> setpagedevice'
print '%d %d translate' % (10, 130)

# PostScript origin is at bottom-left corner of page by default

# first entry in PyPNG list is top row of image

# row is y-axis
row = 0
for vec in imap:
	# loop over columns
	for i in range(0, len(vec), 3):
		rgb = vec[i:(i+3)].tolist()
		
		print '%f %f %f setrgbcolor' % (rgb[0]/255., rgb[1]/255., rgb[2]/255.)
		
		print '%d %d moveto' % (10*i/3+i, 10*(nrow-row) - row)
		print '%d %d lineto' % (10*i/3+10+i, 10*(nrow-row) - row)
		print '%d %d lineto' % (10*i/3+10+i, 10*(nrow-row)+10 - row)
		print '%d %d lineto' % (10*i/3+i, 10*(nrow-row)+10 - row)
		print '%d %d lineto' % (10*i/3+i, 10*(nrow-row) - row)
		
		print 'fill'
		print 'newpath'
		
	row += 1
Yeah, the code is pretty crude - I had the idea one day and threw things together in a hurry to see how feasible it would be. Having a PNG interpreter was a big deal. Next I am going to add an RGB to DMC floss mapping function that will generate a legend, and add those little dots and lines to the squares to differentiate similar colours. Depending on interest, I might package this up into a more convenient "drag and drop"-able bit of software.

Cheers,
- sciencedad

p.s. I suspect that this may be the first time the

Code: Select all

 tag has been used on this board :-)
Last edited by ScienceDad on Sat Apr 30, 2011 10:38 pm, edited 1 time in total.
pixelcraft, a free and open-source web app for making craft patterns from sprites:
http://www.theoryandwings.com/software/pixelcraft

User avatar
Icelandic Hitman
Rank 6 - Tanooki Mario
Rank 6 - Tanooki Mario
Posts: 293
Joined: Wed Feb 25, 2009 10:04 am
Contact:

Re: Python script for generating sprite pattern

Post by Icelandic Hitman »

Nope sorry - viewtopic.php?f=6&t=2301&start=0 <- first use of the code tag
Thread Tracker for iPhone/iPod touch/iPad: http://touchscreencraft.wordpress.com
Etsy items for sales and charts : http://www.etsy.com/shop/touchscreencraft
DA : http://oziphantom.deviantart.com/

ScienceDad
Rank 4 - Raccoon Mario
Rank 4 - Raccoon Mario
Posts: 105
Joined: Thu Sep 23, 2010 10:41 pm

Re: Python script for generating sprite pattern

Post by ScienceDad »

Har! I should've remembered the circles I'm traveling in ;-D
C seems like overkill to me - but I'm stoked to see another open-source project on the site :-)
I stick with Python for my day-to-day coding, and only bring out the C/C++ for the real hard core stuff.
Cheers,
- sd.
pixelcraft, a free and open-source web app for making craft patterns from sprites:
http://www.theoryandwings.com/software/pixelcraft

ScienceDad
Rank 4 - Raccoon Mario
Rank 4 - Raccoon Mario
Posts: 105
Joined: Thu Sep 23, 2010 10:41 pm

Re: Open-source program for cross-stitch charts

Post by ScienceDad »

Okay, I've done some more coding and I'm pretty happy with the results :D

- substitutes colours in PNG with DMC colours
- generates a legend
- modifies "blocks" with patterns (open or closed circles) like a typical cross-stitch chart
- draws a grey outline around white blocks to generate a grid

Here is the same example with the new result:

Before:
kimpine.png
kimpine.png (1.7 KiB) Viewed 3835 times
After:
kimpine_from_pdf.png
kimpine_from_pdf.png (88.52 KiB) Viewed 3836 times
The program generates a PostScript file that Macs can convert to PDF, which I then converted to PNG for posting - also, scroll to the bottom right to see the legend!

Source code and instructions to follow!
- sd.
pixelcraft, a free and open-source web app for making craft patterns from sprites:
http://www.theoryandwings.com/software/pixelcraft

ScienceDad
Rank 4 - Raccoon Mario
Rank 4 - Raccoon Mario
Posts: 105
Joined: Thu Sep 23, 2010 10:41 pm

Re: Open-source program for cross-stitch charts

Post by ScienceDad »

Right, here's the source code! For the time being, I've been calling it "Spriter.py". It's written in a language called Python (hence the "py" extension). Most Macs these days come pre-installed with Python - I'm not sure what the situation is with Windows. To run it, you need to open the Terminal application and type: "python Spriter.py " followed by the name of the PNG file followed by three numbers:

(1) the number of pixels for the width of a block (I use 10)
(2) the number of pixels separating blocks (I use 1)
(3) the number of pixels for a margin around everything (I use 10)

and (IMPORTANT!!!) last of all followed by " > foobar.ps"
This will redirect the massive amount of text this program will write into a file called "foobar.ps". You do not have to call it "foobar" (in fact, please don't. It's just a silly example!), but the "ps" extension is a good idea :-)

Code: Select all

import png, sys, math

# generate RGB-DMC dictionary from file derived from http://www.csh.rit.edu/~vance/pages/color.html
infile = open('rgb2dmc.csv', 'rU')
lines = infile.readlines()
infile.close()

rgb2dmc = {}
for line in lines[1:]:
	dmc, name, red, green, blue, hex = line.strip('\n').split(',')
	rgb2dmc.update ( { (int(red), int(green), int(blue)) : (dmc, name) } )
# function to pick closest DMC colour based on RGB values
# use Euclidean distance for now - but human eye might be more sensitive to
# certain colour differences - check xkcd chart

def find_colour (rgb):
	min_dist = 442
	best_key = None
	for key in rgb2dmc.keys():
		euc_dist = math.sqrt( sum( [ (rgb[i]-key[i])**2 for i in range(3) ] ) )
		if euc_dist < min_dist:
			best_key = key
			min_dist = euc_dist
	dmc, name = rgb2dmc[best_key]
	return best_key, dmc, name


def add_accent (dmc_name, my_left, my_top, block_size):
	# add a small feature to distinguish block from other blocks of
	# similar DMC colour
	if dmc_name.endswith('VY DK'):
		print '0 0 0 setrgbcolor'
		print 'newpath'
		print '%d %d moveto' % (my_left+block_size/2, my_top+block_size/2)
		print '%d %d 2 0 360 arc' % (my_left+block_size/2, my_top+block_size/2)
		print 'closepath'
		print 'fill'
	elif dmc_name.endswith('DK'):
		print '0 0 0 setrgbcolor'
		print '%d %d moveto' % (my_left+block_size/2, my_top+block_size/2)
		print 'newpath'
		print '%d %d 2 0 360 arc' % (my_left+block_size/2, my_top+block_size/2)
		print 'closepath'
		print 'stroke'
	elif dmc_name.endswith('VY LT'):
		print '255 255 255 setrgbcolor'
		print 'newpath'
		print '%d %d moveto' % (my_left+block_size/2, my_top+block_size/2)
		print '%d %d 2 0 360 arc' % (my_left+block_size/2, my_top+block_size/2)
		print 'closepath'
		print 'fill'
	elif dmc_name.endswith('LT'):
		print '255 255 255 setrgbcolor'
		print '%d %d moveto' % (my_left+block_size/2, my_top+block_size/2)
		print 'newpath'
		print '%d %d 2 0 360 arc' % (my_left+block_size/2, my_top+block_size/2)
		print 'closepath'
		print 'stroke'


# =============================================

if len(sys.argv) < 5:
	print 'Usage: python Spriter.py [PNG file] [block size] [gap size] [margin]'
	sys.exit()

infile = open(sys.argv[1])
block_size = int(sys.argv[2])
gap_size = int(sys.argv[3])
margin = int(sys.argv[4])

# import PNG information
pr = png.Reader(infile)
ncol, nrow, imap, stats = pr.read()
# ncol is the x
# nrow is the y

# determine page dimensions
legend_width = block_size * 20
page_height = (block_size+gap_size)*nrow + 2*margin
page_width = (block_size+gap_size)*ncol + 2*margin + legend_width

print '%%!PS\n<< /PageSize [%d %d] >> setpagedevice' % (page_width, page_height)
print '/Helvetica findfont'
print '12 scalefont'
print 'setfont'
print '%d %d translate' % (margin, margin)

# PostScript origin is at bottom-left corner of page by default
# first entry in PyPNG list is top row of image

# generate color palette (dictionary) on the fly
palette = {}

row = 0
for vec in imap:
	# loop over columns
	for i in range(0, len(vec), 3):
		col = i/3
		rgb = tuple(vec[i:(i+3)].tolist())
		if not palette.has_key(rgb):
			palette.update ( { rgb : find_colour(rgb) } )
		rgb, dmc_code, dmc_name = palette[rgb]
		print '%f %f %f setrgbcolor' % (rgb[0]/255., rgb[1]/255., rgb[2]/255.)
		my_top = (block_size+gap_size) * (nrow-row)
		my_left = (block_size+gap_size) * col
		
		print 'newpath'
		print '%d %d moveto' % (my_left, my_top)
		print '%d %d lineto' % (my_left+block_size, my_top)
		print '%d %d lineto' % (my_left+block_size, my_top+block_size)
		print '%d %d lineto' % (my_left, my_top+block_size)
		print '%d %d lineto' % (my_left, my_top)
		print 'fill'
		
		# add grey outline around white block
		if dmc_code == '0':
			print '0.8 0.8 0.8 setrgbcolor'
			print 'newpath'
			print '%d %d moveto' % (my_left, my_top)
			print '%d %d lineto' % (my_left+block_size, my_top)
			print '%d %d lineto' % (my_left+block_size, my_top+block_size)
			print '%d %d lineto' % (my_left, my_top+block_size)
			print '%d %d lineto' % (my_left, my_top)
			print 'stroke'
		add_accent (dmc_name, my_left, my_top, block_size)
	row += 1

# add legend
print '%d %d translate' % (page_width-legend_width-margin, margin)
i = 16
for v in palette.itervalues():
	rgb, dmc_code, dmc_name = v
	my_top = i
	my_left = 0
	print '%f %f %f setrgbcolor' % (rgb[0]/255., rgb[1]/255., rgb[2]/255.)
	print 'newpath'
	print '%d %d moveto' % (my_left, my_top)
	print '%d %d lineto' % (my_left+block_size, my_top)
	print '%d %d lineto' % (my_left+block_size, my_top+block_size)
	print '%d %d lineto' % (my_left, my_top+block_size)
	print '%d %d lineto' % (my_left, my_top)
	print 'fill'
	
	add_accent (dmc_name, my_left, my_top, block_size)
	
	print '0 0 0 setrgbcolor'
	print 'newpath'
	print '%d %d moveto' % (block_size+gap_size, i)
	print '( '+dmc_code+' '+dmc_name+') show'
	i += 16
Contents of rgb2dmc.csv and png.py to follow, I'm trying to keep my messages relatively short.

Cheers,
- sd.
pixelcraft, a free and open-source web app for making craft patterns from sprites:
http://www.theoryandwings.com/software/pixelcraft

ScienceDad
Rank 4 - Raccoon Mario
Rank 4 - Raccoon Mario
Posts: 105
Joined: Thu Sep 23, 2010 10:41 pm

Re: Open-source program for cross-stitch charts

Post by ScienceDad »

Here are the rgb2dmc.csv file contents:

Code: Select all

DMC,Name,RED,GRN,BLU,#RGB
0,blanc White,255,255,255,FFFFFF
208,Lavender-VY DK,148,91,128,945B80
209,Lavender-DK,206,148,186,CE94BA
210,Lavender-MD,236,207,225,ECCFE1
211,Lavender-LT,243,218,228,F3DAE4
221,Shell Pink-VY DK,156,41,74,9C294A
223,Shell Pink-LT,219,128,115,DB8073
224,Shell Pink-VY LT,255,199,176,FFC7B0
225,Shell Pink-ULT VY L,255,240,228,FFF0E4
300,Mahogany-VY DK,143,57,38,8F3926
301,Mahogany-MD,209,102,84,D16654
304,Christmas Red-MD,188,0,97,BC0061
307,Lemon,255,231,109,FFE76D
309,Rose-DP,214,43,91,D62B5B
310,Black,0,0,0,0
311,Navy Blue-MD,0,79,97,004F61
312,Navy Blue-LT,58,84,103,3A5467
315,Antique Mauve-VY DK,163,90,91,A35A5B
316,Antique Mauve-MD,220,141,141,DC8D8D
317,Pewter Grey,167,139,136,A78B88
318,Steel Grey - LT,197,198,190,C5C6BE
319,Pistachio Grn-VY DK,85,95,82,555F52
320,Pistachio Green-MD,138,153,120,8A9978
321,Christmas Red,231,18,97,E71261
322,Navy Blue-VY LT,81,109,135,516D87
326,Rose-VY DP,188,22,65,BC1641
327,Violet-DK,61,0,103,3D0067
333,Blue Violet-VY DK,127,84,130,7F5482
334,Baby Blue-MD,115,140,170,738CAA
335,Rose,219,36,79,DB244F
336,Navy Blue,36,73,103,244967
340,Blue Violet-MD,162,121,164,A279A4
341,Blue Violet-LT,145,180,197,91B4C5
347,Salmon-VY DK,194,36,67,C22443
349,Coral-DK,220,61,91,DC3D5B
350,Coral-MD,237,69,90,ED455A
351,Coral,255,128,135,FF8087
352,Coral-LT,255,157,144,FF9D90
353,Peach Flesh,255,196,184,FFC4B8
355,Terra Cotta-DK,189,73,47,BD492F
356,Terra Cotta-MD,226,114,91,E2725B
367,Pistachio Green-DK,95,112,91,5F705B
368,Pistachio Green-LT,181,206,162,B5CEA2
369,Pistachio Grn-VY LT,243,250,209,F3FAD1
370,Mustard - MD,184,138,87,B88A57
371,Mustard,196,155,100,C49B64
372,Mustard - LT,203,162,107,CBA26B
400,Mahogany-DK,157,60,39,9D3C27
402,Mahogany-VY LT,255,190,164,FFBEA4
407,Sportsman Flsh-VY D,194,101,76,C2654C
413,Pewter Grey - DK,109,95,95,6D5F5F
414,Steel Grey - DK,167,139,136,A78B88
415,Pearl Grey,221,221,218,DDDDDA
420,Hazel Nut Brown-DK,140,91,43,8C5B2B
422,Hazel Nut Brown-LT,237,172,123,EDAC7B
433,Brown-MD,151,84,20,975414
434,Brown-LT,178,103,70,B26746
435,Brown-VY LT,187,107,57,BB6B39
436,Tan,231,152,115,E79873
437,Tan-LT,238,171,121,EEAB79
444,Lemon-DK,255,176,0,FFB000
445,Lemon-LT,255,255,190,FFFFBE
451,Shell Grey - DK,179,151,143,B3978F
452,Shell Grey - MD,210,185,175,D2B9AF
453,Shell Grey - LT,235,207,185,EBCFB9
469,Avocado Green,116,114,92,74725C
470,Avocado Green-LT,133,143,108,858F6C
471,Avocado Green-VY LT,176,187,140,B0BB8C
472,Avocado Green-ULT L,238,255,182,EEFFB6
498,Christmas Red-LT,187,0,97,BB0061
500,Blue Green-VY DK,43,57,41,2B3929
501,Blue Green-DK,67,85,73,435549
502,Blue Green,134,158,134,8.69E+88
503,Blue Green-MD,195,206,183,C3CEB7
504,Blue Green-LT,206,221,193,CEDDC1
517,Wedgewood-MD,16,127,135,107F87
518,Wedgewood-LT,102,148,154,66949A
519,Sky Blue,194,209,207,C2D1CF
520,Fern Green-DK,55,73,18,374912
522,Fern Green,159,169,142,9FA98E
523,Fern Green-LT,172,183,142,ACB78E
524,Fern Green-VY LT,205,182,158,CDB69E
535,Ash Grey - VY LT,85,85,89,555559
543,Beige Brown-UL VY L,239,214,188,EFD6BC
550,Violet-VY LT,109,18,97,6D1261
552,Violet-MD,146,85,130,925582
553,Violet,160,100,146,A06492
554,Violet-LT,243,206,225,F3CEE1
561,Jade-VY DK,59,96,76,3B604C
562,Jade-MD,97,134,97,618661
563,Jade-LT,182,212,180,B6D4B4
564,Jade-VY LT,214,230,204,D6E6CC
580,Moss Green-DK,0,103,0,6700
581,Moss Green,151,152,49,979831
597,Turquoise,128,151,132,809784
598,Turquoise-LT,208,223,205,D0DFCD
600,Cranberry-VY DK,208,57,106,D0396A
601,Cranberry-DK,222,57,105,DE3969
602,Cranberry-MD,231,84,122,E7547A
603,Cranberry,255,115,140,FF738C
604,Cranberry-LT,255,189,202,FFBDCA
605,Cranberry-VY LT,255,207,214,FFCFD6
606,Bright Orange-Red,255,0,0,FF0000
608,Bright Orange,255,91,0,FF5B00
610,Drab Brown - VY DK,151,104,84,976854
611,Drab Brown - DK,158,109,91,9E6D5B
612,Drab Brown - MD,203,152,103,CB9867
613,Drab Brown - LT,219,176,122,DBB07A
632,Negro Flesh-MD,162,77,52,A24D34
640,Beige Grey - VY DK,163,163,157,A3A39D
642,Beige Grey - DK,174,176,170,AEB0AA
644,Beige Grey-MD,224,224,215,E0E0D7
645,Beaver Grey - VY DK,113,113,113,717171
646,Beaver Grey-DK,121,121,121,797979
647,Beaver Grey - MD,190,190,185,BEBEB9
648,Beaver Grey-LT,202,202,202,CACACA
666,Christmas Red-LT,213,39,86,D52756
676,Old Gold-LT,255,206,158,FFCE9E
677,Old Gold-VY LT,255,231,182,FFE7B6
680,Old Gold-DK,209,140,103,D18C67
699,Chirstmas Green,0,91,6,005B06
700,Christmas Green-BRT,0,96,47,00602F
701,Christmas Green-LT,79,108,69,4F6C45
702,Kelly Green,79,121,66,4F7942
703,Chartreuse,121,144,76,79904C
704,Chartreuse-BRT,165,164,103,A5A467
712,Cream,245,240,219,F5F0DB
718,Plum,219,55,121,DB3779
720,Orange Spice-DK,200,36,43,C8242B
721,Orange Spice-MD,255,115,97,FF7361
722,Orange Spice-LT,255,146,109,FF926D
725,Topaz,255,200,124,FFC87C
726,Topaz-LT,255,224,128,FFE080
727,Topaz-VY LT,255,235,168,FFEBA8
729,Old Gold-MD,243,176,128,F3B080
730,Olive Green-VY DK,132,102,0,846600
731,Olive Green-DK,140,103,0,8C6700
732,Olive Green,145,104,0,916800
733,Olive Green-MD,206,155,97,CE9B61
734,Olive Green-LT,221,166,107,DDA66B
738,Tan-VY LT,244,195,139,F4C38B
739,Tan-ULT VY LT,244,233,202,F4E9CA
740,Tangerine,255,131,19,FF8313
741,Tangerine-MD,255,142,4,FF8E04
742,Tangerine-LT,255,183,85,FFB755
743,Yellow-MD,255,230,146,FFE692
744,Yellow-PALE,255,239,170,FFEFAA
745,Yellow-LT PALE,255,240,197,FFF0C5
746,Off White,246,234,219,F6EADB
747,Sky Blue-VY LT,240,247,239,F0F7EF
754,Peach Flesh-LT,251,227,209,FBE3D1
758,Terra Cotta-VY LT,255,177,147,FFB193
760,Salmon,249,160,146,F9A092
761,Salmon-LT,255,201,188,FFC9BC
762,Pearl Grey - VY LT,232,232,229,E8E8E5
772,Pine Green--LT,231,249,203,E7F9CB
775,Baby Blue-VY LT,247,246,248,F7F6F8
776,Pink-MD,255,177,174,FFB1AE
778,Antique Mauve-VY LT,255,199,184,FFC7B8
780,Topaz-ULT VY DK,181,98,46,B5622E
781,Topaz-VY DK,181,107,56,B56B38
782,Topaz-DK,204,119,66,CC7742
783,Topaz-MD,225,146,85,E19255
791,Cornflower Blue-VYD,71,55,93,47375D
792,Cornflower Blue-DK,97,97,128,616180
793,Cornflower Blue-MD,147,139,164,938BA4
794,Cornflower Blue-LT,187,208,218,BBD0DA
796,Royal Blue-DK,30,58,95,1E3A5F
797,Royal Blue,30,66,99,1E4263
798,Delft-DK,103,115,141,67738D
799,Delft-MD,132,156,182,849CB6
800,Delft-PALE,233,238,233,E9EEE9
801,Coffee Brown-DK,123,71,20,7B4714
806,Peacock Blue-DK,30,130,133,1E8285
807,Peacock Blue,128,167,160,80A7A0
809,Delft,190,193,205,BEC1CD
813,Blue-LT,175,195,205,AFC3CD
814,Garnet-DK,162,0,88,A20058
815,Garnet-MD,166,0,91,A6005B
816,Garnet,179,0,91,B3005B
817,Coral Red-VY DK,219,24,85,DB1855
818,Baby Pink,255,234,235,FFEAEB
819,Baby Pink-LT,248,247,221,F8F7DD
820,Royal Blue-VY DK,30,54,85,1E3655
822,Beige Grey-LT,242,234,219,F2EADB
823,Navy Blue-DK,0,0,73,49
824,Blue-VY DK,71,97,116,476174
825,Blue-DK,85,108,128,556C80
826,Blue-MD,115,138,153,738A99
827,Blue-VY LT,213,231,232,D5E7E8
828,Blue-ULT VY LT,237,247,238,EDF7EE
829,Golden Olive-VY DK,130,90,8,825A08
830,Golden Olive-DK,136,95,18,885F12
831,Golden Olive-MD,144,103,18,906712
832,Golden Olive,178,119,55,B27737
833,Golden Olive-LT,219,182,128,DBB680
834,Golden Olive-VY LT,242,209,142,F2D18E
838,Beige Brown-VY DK,94,56,27,5E381B
839,Beige Brown-DK,109,66,39,6D4227
840,Beige Brown-MD,128,85,30,80551E
841,Beige Brown-LT,188,134,107,BC866B
842,Beige Brown-VY LT,219,194,164,DBC2A4
844,Beaver Brown -ULT D,107,103,102,6B6766
868,Hazel Nut Brown-VYD,153,92,48,995C30
869,Hazel Nut Brn-VY DK,153,92,48,995C30
890,Pistachio Grn-ULT D,79,86,76,4F564C
891,Carnation-DK,241,49,84,F13154
892,Carnation-MD,249,90,97,F95A61
893,Carnation-LT,243,149,157,F3959D
894,Carnation-VY LT,255,194,191,FFC2BF
895,Hunter Green-VY DK,89,92,78,595C4E
898,Coffee Brown-VY DK,118,55,19,763713
899,Rose-MD,233,109,115,E96D73
900,Burnt Orange-DK,206,43,0,CE2B00
902,Granet-VY DK,138,24,77,8A184D
904,Parrot Green-VY DK,78,95,57,4E5F39
905,Parrot Green-DK,98,119,57,627739
906,Parrot Green-MD,143,163,89,8FA359
907,Parrot Green-LT,185,200,102,B9C866
909,Emerald Green-VY DK,49,105,85,316955
910,Emerald Green-DK,48,116,91,30745B
911,Emerald Green-MD,49,128,97,318061
912,Emerald Green-LT,115,158,115,7.39E+75
913,Nile Green-MD,153,188,149,99BC95
915,Plum-DK,170,24,91,AA185B
917,Plum-MD,171,22,95,AB165F
918,Red Copper-DK,168,68,76,A8444C
919,Red Copper,180,75,82,B44B52
920,Copper-MD,197,94,88,C55E58
921,Copper,206,103,91,CE675B
922,Copper-LT,237,134,115,ED8673
924,Grey Green--VY DK,86,99,100,566364
926,Grey Green-LT,96,116,115,607473
927,Grey Green-LT,200,198,194,C8C6C2
928,Grey Green--VY LT,225,224,216,E1E0D8
930,Antique Blue-DK,102,122,140,667A8C
931,Antique Blue-MD,124,135,145,7C8791
932,Antique Blue-LT,182,186,194,B6BAC2
934,Black Avocado Green,62,59,40,3E3B28
935,Avocado Green-DK,67,63,47,433F2F
936,Avocado Green--VY D,69,69,49,454531
937,Avocado Green-MD,73,86,55,495637
938,Coffee Brown-ULT DK,99,39,16,632710
939,Navy Blue-Vy DK,0,0,49,31
943,Aquamarine-MD,0,162,117,00A275
945,Flesh-MD,255,206,164,FFCEA4
946,Burnt Orange-MD,244,73,0,F44900
947,Burnt Orange,255,91,0,FF5B00
948,Peach Flesh-VY LT,255,243,231,FFF3E7
950,Sportsman Flesh,239,162,127,EFA27F
951,Flesh,255,229,188,FFE5BC
954,Nile Green,170,213,164,AAD5A4
955,Nile Green-LT,214,230,204,D6E6CC
956,Geranium,255,109,115,FF6D73
957,Gernanium-PALE,255,204,208,FFCCD0
958,Sea Green-DK,0,160,130,00A082
959,Sea Green-MD,171,206,177,ABCEB1
961,Dusty Rose-DK,243,108,123,F36C7B
962,Dusty Rose-MD,253,134,141,FD868D
963,Dusty Rose-ULT VY L,255,233,233,FFE9E9
964,Sea Green-LT,208,224,210,D0E0D2
966,Baby Green-MD,206,213,176,CED5B0
970,Pumpkin-LT,255,117,24,FF7518
971,Pumpkin,255,106,0,FF6A00
972,Canary-DP,255,146,0,FF9200
973,Canary-BRT,255,194,67,FFC243
975,Golden Brown-DK,158,67,18,9E4312
976,Golden Brown-MD,246,141,57,F68D39
977,Golden Brown-LT,255,164,73,FFA449
986,Forest Green-VY DK,58,82,65,3A5241
987,Forest Green-DK,83,97,73,536149
988,Forest Green-MD,134,145,110,86916E
989,Forest Green,134,153,110,86996E
991,Aquamarine-DK,47,91,73,2F5B49
992,Aquamarine,146,183,165,92B7A5
993,Aquamarine-LT,192,224,200,C0E0C8
995,Electric Blue-DK,0,123,134,007B86
996,Electric Blue-MD,170,222,225,AADEE1
3011,Khaki Green-DK,123,91,64,7B5B40
3012,Khaki Green-MD,170,134,103,AA8667
3013,Khaki Green-LT,208,195,164,D0C3A4
3021,Brown Grey - VY DK,115,91,93,735B5D
3022,Brown Grey - MD,172,172,170,ACACAA
3023,Brown Grey - LT,198,190,173,C6BEAD
3024,Brown Grey - VY LT,210,208,205,D2D0CD
3031,Mocha Brown-VY DK,84,56,23,543817
3032,Mocha Brown-MD,188,156,120,BC9C78
3033,Mocha Brown-VY LT,239,219,190,EFDBBE
3041,Antique Violet-MD,190,155,167,BE9BA7
3042,Antique Violet-LT,225,205,200,E1CDC8
3045,Yellow Beige-DK,216,151,105,D89769
3046,Yellow Beige-MD,229,193,139,E5C18B
3047,Yellow Beige-LT,255,236,211,FFECD3
3051,Green Grey-DK,85,73,0,554900
3052,Green Grey--MD,137,141,114,898D72
3053,Green Grey,187,179,148,BBB394
3064,Sportsman Flsh-VY D,194,101,76,C2654C
3072,Beaver Grey - VY LT,233,233,223,E9E9DF
3078,Golden Yellow-VY LT,255,255,220,FFFFDC
3325,Baby Blue-LT,202,226,229,CAE2E5
3326,Rose-LT,255,157,150,FF9D96
3328,Salmon-DK,188,64,85,BC4055
3340,Apricot-MD,255,123,103,FF7B67
3341,Apricot,255,172,162,EBACA2
3345,Hunter Green-DK,97,100,82,616452
3346,Hunter Green,120,134,107,78866B
3347,Yellow Green-MD,128,152,115,809873
3348,Yellow Green-LT,225,249,190,E1F9BE
3350,Dusty Rose-ULT DK,201,79,91,C94F5B
3354,Dusty Rose-LT,255,214,209,FFD6D1
3362,Pine Green-DK,96,95,84,605F54
3363,Pine Green-MD,116,127,96,747F60
3364,Pine Green,161,167,135,A1A787
3371,Black Brown,83,37,16,532510
3607,Plum-LT,231,79,134,E74F86
3608,Plum-VY LT,247,152,182,F798B6
3609,Plum-ULT LT,255,214,229,FFD6E5
3685,Mauve-DK,161,53,79,A1354F
3687,Mauve,203,78,97,CB4E61
3688,Mauve-MD,250,151,144,FA9790
3689,Mauve-LT,255,213,216,FFD5D8
3705,Melon-DK,255,85,91,FF555B
3706,Melon-MD,255,128,109,FF806D
3708,Melon-LT,254,212,219,FED4DB
3712,Salmon-MD,230,101,107,E6656B
3713,Salmon-VY LT,253,229,217,FDE5D9
3716,Dusty Rose-VY LT,255,211,212,FFD3D4
3721,Shell Pink-DK,184,75,77,B84B4D
3722,Shell Pink-MD,184,89,88,B85958
3726,Antique Mauve-DK,195,118,123,C3767B
3727,Antique Mauve-LT,255,199,196,FFC7C4
3731,Dusty Rose-VY DK,209,93,103,D15D67
3733,Dusty Rose,255,154,148,FF9A94
3740,Antique Violet-DK,156,125,133,9C7D85
3743,Antique Violet-VY L,235,235,231,EBEBE7
3746,Blue Violet-DK,149,102,162,9566A2
3747,Blue Violet-VY LT,230,236,232,E6ECE8
3750,Antique Blue-VY DK,12,91,108,0C5B6C
3752,Antique Blue-VY LT,194,209,206,C2D1CE
3753,Ant. Blue-ULT VY LT,237,247,247,EDF7F7
3755,Baby Blue,158,176,206,9EB0CE
3756,Baby Blue-ULT VY LT,248,248,252,F8F8FC
3760,Wedgewood,102,142,152,6.68E+100
3761,Sky Blue-LT,227,234,230,E3EAE6
3765,Peacock Blue-VY DK,24,128,134,188086
3766,Peacock Blue-LT,24,101,111,18656F
3768,Grey Green-DK,92,110,108,5C6E6C
3770,Flesh-VY LT,255,250,224,FFFAE0
3772,Negro Flesh,173,83,62,AD533E
3773,Sportsman Flsh-MD,231,134,103,E78667
3774,Sportsman Flsh-VY L,255,220,193,FFDCC1
3776,Mahogony-LT,221,109,91,DD6D5B
3777,Terra Cotta-VY DK,191,64,36,BF4024
3778,Terra Cotta-LT,237,122,100,ED7A64
3779,Ter. Cotta-ULT VY L,255,177,152,FFB198
3781,Mocha Brown-DK,113,71,42,71472A
3782,Mocho Brown-LT,206,175,144,CEAF90
3787,Brown Grey - DK,139,109,115,8B6D73
3790,Beige Grey - ULT DK,140,117,109,8C756D
3799,Pewter Grey - VY DK,81,76,83,514C53
Unfortunately, the png.py file is about twice as long as the permitted message size on the board.
Until I figure out how to pare down the source, you'll have to download the PyPNG package (pypng-0.0.11.tar.gz at http://code.google.com/p/pypng/downloads/list) and pull the "png.py" file out of the "code" folder and place it in the Spriter folder.

Sorry it's kinda technical :-/ If there's interest, I can work on packaging this all together as an easy-to-use application - but I'm not otherwise inclined to because it doesn't seem like there's that much interest..

Cheers,
- sd
pixelcraft, a free and open-source web app for making craft patterns from sprites:
http://www.theoryandwings.com/software/pixelcraft

Post Reply