How about using a dictionary instead of variables, to do something like the 
following:

images = Dict{AbstractString, Image}()     # dictionary associating an 
Image object to a string
image["flower"] = imread("flower.png") # made up function name

Accessing the dictionary won't significantly slow the access to the image 
data stored in memory, and you can access the images by their reference 
string, which can depend on input data (e.g. a list of files).

Reply via email to