Optimisation of PNG version through type annotations