[04:34:44] <wiredfool_> http://www.insweat.com/whispers/articles/python-gc -- see para 2. gc.DEBUG_LEAK looks like a memory leak itself, esp to tools like top
[04:37:00] <wiredfool_> second, there's definitely some retained objects in the boto uploads to s3 https://gist.github.com/wiredfool/5754498
[04:37:03] <crundar> I'm looking to convert my numeric (integer) data into pixels in a greyscale file. I'd like to take advantage of the PNG or TIFF's ability to generate 2^16 shades of grey. Does PIL have a method to do that as simply as it does write RGB values?
[04:37:30] <crundar> I've seen the 'L' mode, but that's too restrictive for what I'm after, I believe
[04:37:47] <wiredfool_> There are quite a few modes, but...
[04:38:47] <wiredfool_> I don't think 16bit gray is one of therm.
[04:39:29] <crundar> Or even just a way to specify the 16 bits of grey available and use precisely those?
[04:39:42] <wiredfool_> tiff isn't likely to be able to save it in anything other than uncompressed raw
[04:39:58] <crundar> I'm execting my images to be sent to a B&W printer, and I'd like to get as much luminescence (if that the word I want) as possible.
[04:39:59] <wiredfool_> I'm not as familiar with the inside of png
[04:40:38] <wiredfool_> like a 16 bit paletized image?
[04:41:35] <crundar> you went past me at paletized
[04:42:14] <wiredfool_> ah. like gif, indexed color into a palette
[04:42:20] <crundar> I was looking here http://www.aivosto.com/vbtips/imageformats.html , found that they have more greys than I'm currently getting, and searched around PIL to no avail.
[04:46:22] <wiredfool_> and it does look like it can write it, at least in raw mode in tiff
[04:47:24] <wiredfool_> you'd have to set compression to 'raw'
[04:48:43] <crundar> write it as raw mode in tiff... then Pythonmagick to PNG (losslessly)
[04:48:56] <crundar> and I think I can get PNGs to display in xelatex
[04:49:09] <crundar> Rube Goldberg couldn't've planned it any better himself.
[04:49:11] <wiredfool_> let me look at the png source
[04:50:30] <wiredfool_> crundar: no, that's nowhere near as convoluted as it could get
[04:52:05] <wiredfool_> looks like in PNG, I is the mode you want, it writes as I;16B, but I'm not sure if it's a 32 bit source and 16bit output, or if it's 16bit in 16bit out.
[04:52:35] <crundar> Wait, so I can just open it with I instead of RGB, and it should just do its thing?
[04:52:45] <wiredfool_> but I mode is definitely wrong for tiff, you want I;16
[04:53:50] <crundar> I was kind of hoping to not have to learn tonight about how colors and greys and such work; that there is in fact a mode that'll just make it happen if i feed it integers with the range 0 to (sub1 (* 2 16))
[04:53:58] <wiredfool_> sorry, I might be confused between modes and rawmodes
[04:54:48] <wiredfool_> what I'd try is test it out with synthetic data, put the data in as 16bit, set the mode as I, and then try writing the png and tiff, and see if you get out what you expect
[04:55:09] <wiredfool_> and if you have a good test + images, send them and I'll add them to the test suite
[04:56:26] <wiredfool_> I don't see anything obvious in the test suite.
[04:57:47] <crundar> Alright, I'll go try that right now.