Does autoencoder with few images not work?
I'm doing the same thing actually. I had to find tools because I was getting black images too.
This one worked for me:
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.figure import Figure
from matplotlib.backends.backend_agg import FigureCanvas
from PIL import Image
import tensorflow as tf

keras_imager = tf.keras.preprocessing.image

# creating a figure to plot data
fig = Figure(figsize=(3, 2), dpi=96) # adjust your params
canvas = FigureCanvas(fig)
ax = fig.add_subplot(111)

# plot the data
ax.plot(your_data)

# draw the canvas, cache the renderer
canvas.draw()       
s, (width, height) = canvas.print_to_buffer()

# converting to a NumPy array.
X = np.frombuffer(s, np.uint8).reshape((height, width, 4))

# converting to 3D rgb array data
img = keras_imager.array_to_img(X)
rgb = img.convert('RGB')
arr = keras_imager.img_to_array(rgb)
# standardize each image 
arr = tf.image.per_image_standardization(arr)

# If you want to resize
arr = tf.image.resize(arr, (32, 32), # &lt;- adjust your param
                     preserve_aspect_ratio=True)
# you can view the keras transformed plot 
keras_imager.array_to_img(rgb)

Honestly, I don't quite understand all the parameters, but it's the simplest way I could tweak it to work for my situation. Good luck.