Generic image processing library