Add auto fixing jpg file orientation.
This commit is contained in:
17
go/images/orientation_test.go
Normal file
17
go/images/orientation_test.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package images
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestXYZ(t *testing.T) {
|
||||
fname := "sample1.jpg"
|
||||
|
||||
dat, _ := ioutil.ReadFile(fname)
|
||||
|
||||
fixed_data := FixJpgOrientation(".jpg", dat)
|
||||
|
||||
ioutil.WriteFile("fixed1.jpg", fixed_data, 0644)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user