We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I need to extract exif from ai generated image.
like this:
The text was updated successfully, but these errors were encountered:
this is my demo
package main import ( "fmt" "github.com/rwcarlsen/goexif/exif" "os" ) func ReadOrientation(filename string) int { file, err := os.Open(filename) if err != nil { fmt.Println("failed to open file, err: ", err) return 0 } defer file.Close() x, err := exif.Decode(file) if err != nil { fmt.Println("failed to decode file, err: ", err) return 0 } orientation, err := x.Get(exif.Orientation) if err != nil { fmt.Println("failed to get orientation, err: ", err) return 0 } orientVal, err := orientation.Int(0) if err != nil { fmt.Println("failed to convert type of orientation, err: ", err) return 0 } fmt.Println("the value of photo orientation is :", orientVal) return orientVal } func main() { ReadOrientation("5242974a.png") }
they report :failed to decode file, err: exif: failed to find exif intro marker
Sorry, something went wrong.
No branches or pull requests
I need to extract exif from ai generated image.
like this:
The text was updated successfully, but these errors were encountered: