using bytes in image type conversions