add blockarray to image conversion
cleaner pixel copying functions
add tests