Could you attach an example file and a converted image (PNG or JPG) for me to verify that my method works?
EDIT: from what I just saw from googling: it should work with
img_data = fits.get_data(filename)

As load function and then passing the numpy array to the transformations