Creates a string from a matrix given a separator and a function to
show each entry. Using this function the user can easily define any
desired display function:
Tries to detect the image format by attempting formattedAs with
each possible Format.
If you're trying to test for a specific format, use a specific
formattedAs directly instead.