add subsample and exportAsPngs to image