API: used reflection in order to have an arbitrary number of parameter for getFormattedImage issue #1752