added methods import_pixels and import_pixels_flat