{"id":34629608,"url":"https://github.com/sebnyberg/imgcrop","last_synced_at":"2026-05-22T23:31:46.261Z","repository":{"id":143268958,"uuid":"614553987","full_name":"sebnyberg/imgcrop","owner":"sebnyberg","description":"Efficient cropping of large images","archived":false,"fork":false,"pushed_at":"2026-03-30T16:22:17.000Z","size":831,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-04T21:45:25.698Z","etag":null,"topics":["bmp","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sebnyberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-15T20:32:34.000Z","updated_at":"2025-06-02T05:02:53.000Z","dependencies_parsed_at":"2025-03-27T06:34:17.835Z","dependency_job_id":null,"html_url":"https://github.com/sebnyberg/imgcrop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sebnyberg/imgcrop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebnyberg%2Fimgcrop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebnyberg%2Fimgcrop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebnyberg%2Fimgcrop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebnyberg%2Fimgcrop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebnyberg","download_url":"https://codeload.github.com/sebnyberg/imgcrop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebnyberg%2Fimgcrop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33376067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-22T21:56:13.512Z","status":"ssl_error","status_checked_at":"2026-05-22T21:56:10.769Z","response_time":265,"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":["bmp","image-processing"],"created_at":"2025-12-24T16:34:00.954Z","updated_at":"2026-05-22T23:31:46.257Z","avatar_url":"https://github.com/sebnyberg.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# imgcrop\n\nLibrary for efficient cropping of very large images.\n\nSee [Design Doc](./docs/DESIGN.md) for background and design considerations.\n\n## Stability\n\n:warning: This package is under development and in flux. :warning:\n\n## Installation\n\n```shell\ngo get github.com/sebnyberg/imgcrop\n```\n\n## Usage\n\n```go\nsrc, err := os.Open(\"big.bmp\")\nif err != nil {\n    return err\n}\n\ndst, err := os.Open(\"cropped.bmp\")\nif err != nil {\n    return err\n}\n\noffx := 5500\noffy := 7500\nwidth := 1500\nheight := 2000\nregion := image.Rect(offx, offy, width, height)\nerr = bmpx.Crop(src, dest, region)\nif err != nil {\n    return err\n}\n```\n\n## Performance\n\nBenchmark that crops different sizes from a 1.2GiB 29566x14321 px image and stores the result in an output file, randomizing x- and y-offset with each crop:\n\n\n```\ngo test -test.v -test.run=NONE -test.bench='^\\QBenchmarkBMP\\E$'\ngoos: linux\ngoarch: amd64\npkg: github.com/sebnyberg/imgcrop/bmpx\ncpu: Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz\nBenchmarkBMP\nBenchmarkBMP/100X100\nBenchmarkBMP/100X100-6         \t    1748\t    613716 ns/op\nBenchmarkBMP/100X800\nBenchmarkBMP/100X800-6         \t     261\t   4610897 ns/op\nBenchmarkBMP/100X6400\nBenchmarkBMP/100X6400-6        \t      32\t  37329677 ns/op\nBenchmarkBMP/800X100\nBenchmarkBMP/800X100-6         \t    1609\t    747651 ns/op\nBenchmarkBMP/800X800\nBenchmarkBMP/800X800-6         \t     202\t   6291474 ns/op\nBenchmarkBMP/800X6400\nBenchmarkBMP/800X6400-6        \t      22\t  47321119 ns/op\nBenchmarkBMP/6400X100\nBenchmarkBMP/6400X100-6        \t     636\t   1881620 ns/op\nBenchmarkBMP/6400X800\nBenchmarkBMP/6400X800-6        \t      72\t  15344632 ns/op\nBenchmarkBMP/6400X6400\nBenchmarkBMP/6400X6400-6       \t       9\t 130090939 ns/op\nPASS\nok  \tgithub.com/sebnyberg/imgcrop/bmpx\t15.100s\n```\n\n`\n\n## Examples\n\n* [Cropping PNG (terrible perf)](./examples/png.go)\n\n## Testing\n\nThis library has been tested by a friend externally, trust me. :eyes:\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebnyberg%2Fimgcrop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebnyberg%2Fimgcrop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebnyberg%2Fimgcrop/lists"}