Reusing the code makes it more modular and you could make one download function that depending on the parameter from processing it returns either colour, gray or doublegray
Reusing the code makes it more modular and you could make one download function that depending on the parameter from processing it returns either colour, gray or doublegray