Scaling Icons - Why is pyRevit so good at it?

I´m far away from understanding what exactly this cheat is that allows the displaying of larger images, but some user from the Revit forum created an equivalent C# code and also gave an explanation.