added autoRotate to fix some jpeg being upside down