{"id":19145985,"url":"https://github.com/disintegration/imageorient","last_synced_at":"2025-05-07T02:03:38.552Z","repository":{"id":57481379,"uuid":"86760172","full_name":"disintegration/imageorient","owner":"disintegration","description":"Go image decoding with respect to the EXIF orientation tag","archived":false,"fork":false,"pushed_at":"2018-09-20T19:55:49.000Z","size":13,"stargazers_count":73,"open_issues_count":0,"forks_count":12,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-07T02:03:32.164Z","etag":null,"topics":["decode","exif","fix","go","image","orientation","tag"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/disintegration.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-31T00:03:52.000Z","updated_at":"2025-03-25T09:43:43.000Z","dependencies_parsed_at":"2022-09-26T22:11:36.928Z","dependency_job_id":null,"html_url":"https://github.com/disintegration/imageorient","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disintegration%2Fimageorient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disintegration%2Fimageorient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disintegration%2Fimageorient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disintegration%2Fimageorient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/disintegration","download_url":"https://codeload.github.com/disintegration/imageorient/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252798839,"owners_count":21805884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decode","exif","fix","go","image","orientation","tag"],"created_at":"2024-11-09T07:42:53.069Z","updated_at":"2025-05-07T02:03:38.521Z","avatar_url":"https://github.com/disintegration.png","language":"Go","readme":"# imageorient\n\n[![GoDoc](https://godoc.org/github.com/disintegration/imageorient?status.svg)](https://godoc.org/github.com/disintegration/imageorient)\n\nPackage `imageorient` provides image decoding functions similar to standard library's\n`image.Decode` and `image.DecodeConfig` with the addition that they also handle the\nEXIF orientation tag (if present).\n\nLicense: MIT.\n\nSee also: http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/\n\n## Install / Update\n\n    go get -u github.com/disintegration/imageorient\n\n## Documentation\n\nhttp://godoc.org/github.com/disintegration/imageorient\n\n## Usage example\n\n```go\npackage main\n\nimport (\n\t\"image/jpeg\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/disintegration/imageorient\"\n)\n\nfunc main() {\n\t// Open the test image. This particular image have the EXIF\n\t// orientation tag set to 3 (rotated by 180 deg).\n\tf, err := os.Open(\"testdata/orientation_3.jpg\")\n\tif err != nil {\n\t\tlog.Fatalf(\"os.Open failed: %v\", err)\n\t}\n\n\t// Decode the test image using the imageorient.Decode function\n\t// to handle the image orientation correctly.\n\timg, _, err := imageorient.Decode(f)\n\tif err != nil {\n\t\tlog.Fatalf(\"imageorient.Decode failed: %v\", err)\n\t}\n\n\t// Save the decoded image to a new file. If we used image.Decode\n\t// instead of imageorient.Decode on the previous step, the saved\n\t// image would appear rotated.\n\tf, err = os.Create(\"testdata/example_output.jpg\")\n\tif err != nil {\n\t\tlog.Fatalf(\"os.Create failed: %v\", err)\n\t}\n\terr = jpeg.Encode(f, img, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"jpeg.Encode failed: %v\", err)\n\t}\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisintegration%2Fimageorient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdisintegration%2Fimageorient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisintegration%2Fimageorient/lists"}