So, I'm working on this task I was given where I should be able to compare two image files and state how similar they are. But it should work with all file formats like jpg, png, gif etc with files of different sizes.
I am using the Structural Similarity Index method to do this task. The program I've worked on till now accommodates all required file formats except gif and to work with gif I need to extract a frame from the gif, convert it to grayscale and resize etc After extracting the frames I need to save it locally on the disk before I can convert it into grayscale. Is there a way I can extract the frame and directly convert into grayscale without saving the frame locally?