Invalid image throwing "Parameter is not valid." error when printing Docentric template report

When printing a report with an image (for example company logo), those images are read with the .NET System.Drawing.FromStream method (documentation).

When this method gets an invalid image (either due to wrong format or corrupt data) it throws a System.ArgumentException with the unfortunately vague “Parameter is not valid.” message:
image
This is how it looks like in D365 (note that “Document generation has failed.” is a Docentric error message thrown from the Docentric.AX dll):
image

First thing to try is to deactivate the Docentric report like so:

Then try to print the SSRS report to screen:

If you notice that the image fails to load and instead has the little crossed out image symbol, this means that the image is either in the wrong format or more likely corrupt.

Try to re-upload the image until it renders correctly on the SSRS report, then try to print the Docentric report again and the error should be gone.