Optimise the reading of bitmap files (except the ones that come from saved states).