I'm trying to take an input image and save 10 augmented versions of that image using the flow method of a ImageDataGenerator object. The issue is that it's unintentionally changing the color of my image, even when I pass no arguments into the ImageDataGenerator class.
Here's my input image and code with my output image below. I'm using Tensorflow 2.2.0
from tensorflow.keras.preprocessing import image
from tensorflow.keras.preprocessing.image import ImageDataGenerator
img = image.load_img(r'C:\Users\me\Desktop\test.jpg')
img_array = image.img_to_array(img)
img_array = img_array.reshape((1,) + img_array.shape)
datagen = ImageDataGenerator() #no arguments, no augmentations
save_to_dir = r'C:\Users\me\Desktop'
i = 0
for batch in datagen.flow(img_array, batch_size=1, save_to_dir=save_to_dir, save_format='jpg'):
if i == 9:
break
i += 1
The color of the image is drastically different. Any help would be appreciated.