API: used call_user_func_array in order to have an arbitrary number of parameter for getFormattedImage (fixes #1752)