# HG changeset patch # User Mike Pavone # Date 1378520026 25200 # Node ID 580b64af2241d1d124895c5598505237926a64e0 # Parent 19226d79f839ceea19e29b089caaa721a24ea7c1 Add support for images that have already had their width cut down in direct color converter. Remove debug print statement. diff -r 19226d79f839 -r 580b64af2241 img2dcolor.py --- a/img2dcolor.py Fri Sep 06 19:09:19 2013 -0700 +++ b/img2dcolor.py Fri Sep 06 19:13:46 2013 -0700 @@ -18,16 +18,16 @@ A = 255 x = 0 y = 0 + out_width = width if width <= 198 else width/2 for pixel in pixels: if x == width: x = 0 y += 1 if x == 0: - pad = 198-width/2 - print 'pad', pad + pad = 198-out_width for i in xrange(0, pad*2): gpixels.append(0) - if not (x & 1): + if width == out_width or not (x & 1): (R,G,B) = gcolor(pixel) gpixels.append(B) gpixels.append(G << 4 | R)