# Functions
GenerateThumbnail generates the configured thumbnail size for the source file.
GenerateThumbnails generates the configured thumbnail sizes for the source file.
GetThumbnailPath returns the path to a thumbnail given the absolute src path and thumbnail size configuration.
SelectThumbnail compares the (potentially) available thumbnails with the desired thumbnail and returns the best match The algorithm is very similar to what was implemented in Synapse In order of priority unless absolute, the following metrics are compared; the image is: * the same size or larger than requested * if a cropped image is desired, has an aspect ratio close to requested * has a size close to requested * if a cropped image is desired, prefer the same method, if scaled is desired, absolutely require scaled * has a small file size If a pre-generated thumbnail size is the best match, but it has not been generated yet, the caller can use the returned size to generate it.