orientation_test.go 265 B

1234567891011121314151617181920
  1. package images
  2. import (
  3. "io/ioutil"
  4. "os"
  5. "testing"
  6. )
  7. func TestXYZ(t *testing.T) {
  8. fname := "sample1.jpg"
  9. dat, _ := ioutil.ReadFile(fname)
  10. fixed_data := FixJpgOrientation(dat)
  11. ioutil.WriteFile("fixed1.jpg", fixed_data, 0644)
  12. os.Remove("fixed1.jpg")
  13. }