Formatted and implemented using data_dir and convert() instead of img_as_ubyte