Add stride to more robustly handle JPEG input files