Optimise the reading of bitmap files.