{"id":37959610,"url":"https://github.com/janczer/mirror","last_synced_at":"2026-01-16T18:03:03.822Z","repository":{"id":57600092,"uuid":"95813930","full_name":"janczer/mirror","owner":"janczer","description":"Very simple function for mirroring images in Go","archived":false,"fork":false,"pushed_at":"2017-07-01T17:19:27.000Z","size":106,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T15:01:20.908Z","etag":null,"topics":["go","golang","image-processing"],"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/janczer.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-06-29T19:49:19.000Z","updated_at":"2018-04-25T12:15:32.000Z","dependencies_parsed_at":"2022-09-16T18:40:26.504Z","dependency_job_id":null,"html_url":"https://github.com/janczer/mirror","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/janczer/mirror","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janczer%2Fmirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janczer%2Fmirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janczer%2Fmirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janczer%2Fmirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janczer","download_url":"https://codeload.github.com/janczer/mirror/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janczer%2Fmirror/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["go","golang","image-processing"],"created_at":"2026-01-16T18:03:03.754Z","updated_at":"2026-01-16T18:03:03.811Z","avatar_url":"https://github.com/janczer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mirror\n\nIt's a very simple package with only one function for mirror image.\n\nFunction `MirrorImage` get 3 parameters:\n\n```\nfunc MirrorImage(in image.Image, ox bool, oy bool) image.Image\n```\n\n- `in` - object for mirror\n- `ox` - if `true` when image mirrored horizontally\n- `oy` - if `true` when image mirrored vertically\n\n## Simple usage\n\nFirst get the package:\n\n```\n$ go get github.com/janczer/mirror\n```\n\nAfter that create `main.go` and add this:\n\n```\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/janczer/mirror\"\n    \"image\"\n    \"image/jpeg\"\n    \"log\"\n    \"os\"\n)\n\nfunc main() {\n    fmt.Println(\"simple usage github.com/janczer/mirror\")\n\n    reader, err := os.Open(\"test.jpg\") //open image file\n    if err != nil {\n        log.Fatal(err)\n    }\n    defer reader.Close()\n\n    m, _, err := image.Decode(reader) //decode file\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    mirroredImage := mirror.MirrorImage(m, true, true)\n\n    //create new image file\n    f, err := os.Create(\"mirror.jpg\")\n    jpeg.Encode(f, mirroredImage, nil)\n    f.Close()\n}\n\n```\n\nSave image that you want mirrored to the same directory that `main.go` and run it:\n\n```\n$ go run main.go\n```\n\nAnd you have two files `test.jpg` and `mirror.jpg`.\n\n![Gopher](test.jpg)\n![Gopher](mirror.jpg)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanczer%2Fmirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanczer%2Fmirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanczer%2Fmirror/lists"}