Hi @randino ,
Please check the following minimal example on how to read, save and load image from mat file.
import scipy.io as sio
import matplotlib.pyplot as plt
import numpy as np

# taking the cifar-10 mat version for testing
mat = './cifar-10-batches-mat/data_batch_1.mat'
# loading mat file
mat = sio.loadmat(mat)
# finding the key values
print(mat.keys())
# output:  dict_keys(['__header__', '__version__', '__globals__', 'data', 'labels', 'batch_label'])

# we will take the "data" key from the dict as it contains images
data = np.asarray(mat.get('data'))
# reshaping the raw data into image format (channel first approach)
data = data.reshape((-1, 3, 32, 32))
data = data.swapaxes(3, 2).swapaxes(1, 3)  # swapping axes for image correction
data_image = data[0]  # taking the first image of the dataset
print(data_image.shape)
# output: (32,32,3)
plt.imsave('./data_image.jpg', np.asarray(data_image))  # saving the image

# reading back
image = plt.imread('/home/la-belva/code_ground/data_image.jpg')  # reading the saved image
print(image.shape)
# output: (32,32,3)

Let me know if you face any problems.