Replaced imageData function

Replacing the newImageData function with a more complex newImageData(newFileData) function improves loading speed