Hi, I finally got a bit fed up with the state of reading & writing images in Python/numpy and started a new project: imread https://github.com/luispedro/imread I want it to be simple: No image processing at all, just getting the bytes out of image files and into image files. This way it has a better chance of being very stable and getting into linux distros and stuff like that. Once it matures a bit, I will use it in mahotas and I will submit a patch to scikits.learn. It currently has two functions imread : filename -> numpy array : reads a file imsave: filename & numpy array : writes a file I can imaging adding another pair to read&write to an in-memory buffer and perhaps a way to guess fileformats and retrieve metadata. But, again, there will be exactly zero image processing functions. That's for other packages to worry about. It only supports PNG at the moment (using libpng) and JPEG (through libjpeg). It needs better error checking, of course. It should be boring and solid. With TIFF, I will call it "1.0" as it will cover most use cases. What do you guys think? -- Luis Pedro Coelho | University of Lisbon | http://luispedro.org Q29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9wZ3Atc2lnbmF0dXJlOyBuYW1lPSJzaWduYXR1cmUu YXNjIg0KQ29udGVudC1EZXNjcmlwdGlvbjogVGhpcyBpcyBhIGRpZ2l0YWxseSBzaWduZWQgbWVz c2FnZSBwYXJ0Lg0KDQotLS0tLUJFR0lOIFBHUCBTSUdOQVRVUkUtLS0tLQpWZXJzaW9uOiBHbnVQ RyB2MS40LjExIChHTlUvTGludXgpCgppRVlFQUJFQ0FBWUZBazhzRkcwQUNna1FFUTFzbU9kZ3Z2 STZQUUNlUFR6Mnd5Zk5UeGo4RnhSUHAzQUJJOTVUCnJIOEFuMm5ubGJkcDFZK3ArUXhuVVVxL205 MGF0aXhOCj1kSlF5Ci0tLS0tRU5EIFBHUCBTSUdOQVRVUkUtLS0tLQo=
On Fri, Feb 3, 2012 at 9:07 AM, Luis Pedro Coelho
I want it to be simple: No image processing at all, just getting the bytes out of image files and into image files.
A simple image reader would certainly be useful. There's been some hope that someone would do this in pure Python (and I think Zach may even have started on that), but so far that's not panned out. Wrapping libjpeg and libpng seems very similar to what matplotlib does, so you may also want to look at their code (we currently provide those functions as an skimage.io plugin). Regards Stéfan