Me and the guys wrote a big old image processing library one summer. Plenty of memory allocation involved!