2004.08.12 15:15 "Re: [Tiff] From bmp to Tiff", by Jay Berkenbilt
I wrote some example code that includes an area-averaging algorithm for the purposes of demonstrating it to a potential customer. The purpose of my algorithm was to be able to downsample an image reading as little of the image into memory at a time as was possible. I came up with the algorithm myself not realizing it was a standard approach and thought about it in terms of pouring paint from one set of containers into another set of containers. My code includes copious comments describing how to think about the algorithm. The entire source is about 350 lines including comments and blank lines, about 200 lines ignoring them. There is also a trivial example program that scales binary pgm or ppm files with it. It would be easy to use this program to scale tiffs. In fact, I originally wrote it for that purpose.
I'd be happy to share this code with any individual who wants it, post it to the list, or put it somewhere and post a link. Let me know if you're interested.
Jay Berkenbilt <email@example.com>