transformImageToList function

Transforms the image in the object need it to run the analysis.