added buffered image support