Fix dataset previews in python3
Use proper method to convert embedded image data