implements open image from buffer. closes #35