{"id":13413171,"url":"https://github.com/anthonynsimon/bild","last_synced_at":"2025-05-14T03:03:27.863Z","repository":{"id":10158095,"uuid":"64680737","full_name":"anthonynsimon/bild","owner":"anthonynsimon","description":"Image processing algorithms in pure Go","archived":false,"fork":false,"pushed_at":"2024-09-24T10:06:15.000Z","size":9284,"stargazers_count":4090,"open_issues_count":20,"forks_count":215,"subscribers_count":72,"default_branch":"master","last_synced_at":"2025-05-06T18:08:42.937Z","etag":null,"topics":["algorithm","concurrency","effects","go","histogram","image-editing","image-processing","parallelism","resize","signal-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/anthonynsimon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2016-08-01T15:54:29.000Z","updated_at":"2025-05-06T05:06:06.000Z","dependencies_parsed_at":"2024-10-14T13:40:36.664Z","dependency_job_id":"6b4a8a7b-253d-4bbd-83ff-01f292e2ec87","html_url":"https://github.com/anthonynsimon/bild","commit_stats":{"total_commits":283,"total_committers":20,"mean_commits":14.15,"dds":0.3745583038869258,"last_synced_commit":"c62f9cd1f26fce2f4a5070539f862086a5c233a5"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonynsimon%2Fbild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonynsimon%2Fbild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonynsimon%2Fbild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonynsimon%2Fbild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthonynsimon","download_url":"https://codeload.github.com/anthonynsimon/bild/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254059474,"owners_count":22007767,"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":["algorithm","concurrency","effects","go","histogram","image-editing","image-processing","parallelism","resize","signal-processing"],"created_at":"2024-07-30T20:01:34.441Z","updated_at":"2025-05-14T03:03:27.822Z","avatar_url":"https://github.com/anthonynsimon.png","language":"Go","readme":"# bild\n\n![bild logo](assets/img/logo.png)  \n\n[![MIT License](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/anthonynsimon/bild/blob/master/LICENSE)\n[![GoDoc](https://godoc.org/github.com/anthonynsimon/bild?status.svg)](https://godoc.org/github.com/anthonynsimon/bild)\n[![Go Report Card](https://goreportcard.com/badge/github.com/anthonynsimon/bild)](https://goreportcard.com/report/github.com/anthonynsimon/bild)\n\nA collection of parallel image processing algorithms in pure Go.\n\nThe aim of this project is simplicity in use and development over absolute high performance, but most algorithms are designed to be efficient and make use of parallelism when available.\n\nIt uses packages from the standard library whenever possible to reduce dependency use and development abstractions.\n\nAll operations return image types from the standard library.\n \n## Documentation\nThe documentation for the various packages is available [here](https://pkg.go.dev/mod/github.com/anthonynsimon/bild?tab=packages).\n\n\n## CLI usage\n\nDownload and compile from sources:\n```\ngo get github.com/anthonynsimon/bild\n```\n\nOr get the pre-compiled binaries for your platform on the [releases page](https://github.com/anthonynsimon/bild/releases)\n\n\n```\nbild\n\nA collection of parallel image processing algorithms in pure Go\n\nUsage:\n  bild [command]\n\nAvailable Commands:\n  adjust      adjust basic image features like brightness or contrast\n  blend       blend two images together\n  blur        blur an image using the specified method\n  channel     channel operations on images\n  effect      apply effects on images\n  help        Help about any command\n  histogram   histogram operations on images\n  imgio       i/o operations on images\n  noise       noise generators\n  segment     segment an image using the specified method\n\nFlags:\n  -h, --help      help for bild\n      --version   version for bild\n\nUse \"bild [command] --help\" for more information about a command.\n```\n\nFor example, to apply a median effect with a radius of 1.5 on the image `input.png`, writing the result into a new file called `output.png`:\n```\nbild effect median --radius 1.5 input.png output.png\n```\n\n\n## Install package\n\nbild requires Go version 1.11 or greater.\n\n```bash\ngo get github.com/anthonynsimon/bild/...\n```\n\n## Basic package usage example:\n```go\npackage main\n\nimport (\n    \"github.com/anthonynsimon/bild/effect\"\n    \"github.com/anthonynsimon/bild/imgio\"\n    \"github.com/anthonynsimon/bild/transform\"\n)\n\nfunc main() {\n    img, err := imgio.Open(\"input.jpg\")\n    if err != nil {\n        fmt.Println(err)\n        return\n    }\n\n    inverted := effect.Invert(img)\n    resized := transform.Resize(inverted, 800, 800, transform.Linear)\n    rotated := transform.Rotate(resized, 45, nil)\n\n    if err := imgio.Save(\"output.png\", rotated, imgio.PNGEncoder()); err != nil {\n        fmt.Println(err)\n        return\n    }\n}\n```\n\n# Output examples\n## Adjustment\n    import \"github.com/anthonynsimon/bild/adjust\"\n\n### Brightness\n    result := adjust.Brightness(img, 0.25)\n\n![example](assets/img/brightness.jpg)  \n\n### Contrast\n    result := adjust.Contrast(img, -0.5)\n\n![example](assets/img/contrast.jpg)  \n\n### Gamma\n    result := adjust.Gamma(img, 2.2)\n\n![example](assets/img/gamma.jpg)  \n\n\n### Hue\n    result := adjust.Hue(img, -42)\n\n![example](assets/img/hue.jpg)  \n\n### Saturation\n    result := adjust.Saturation(img, 0.5)\n\n![example](assets/img/saturation.jpg)  \n\n\n\n## Blend modes\n    import \"github.com/anthonynsimon/bild/blend\"\n\n    result := blend.Multiply(bg, fg)\n\n| Add | Color Burn | Color Dodge |\n| :----------: | :---------: | :------: |\n| ![](assets/img/add.jpg) | ![](assets/img/colorburn.jpg) | ![](assets/img/colordodge.jpg) |\n| **Darken** | **Difference** | **Divide** |\n| ![](assets/img/darken.jpg) | ![](assets/img/difference.jpg) | ![](assets/img/divide.jpg) |\n| **Exclusion** | **Lighten** | **Linear Burn** |\n| ![](assets/img/exclusion.jpg) | ![](assets/img/lighten.jpg) | ![](assets/img/linearburn.jpg) |\n| **Linear Light** | **Multiply** | **Normal** |\n| ![](assets/img/linearlight.jpg) | ![](assets/img/multiply.jpg) | ![](assets/img/normal.jpg) |\n| **Opacity** | **Overlay** | **Screen** |\n| ![](assets/img/opacity.jpg) | ![](assets/img/overlay.jpg) | ![](assets/img/screen.jpg) |\n| **Soft Light** | **Subtract** | |\n| ![](assets/img/softlight.jpg) | ![](assets/img/subtract.jpg) | |\n\n\n## Blur\n    import \"github.com/anthonynsimon/bild/blur\"\n\n### Box Blur\n    result := blur.Box(img, 3.0)\n\n![example](assets/img/boxblur.jpg)  \n\n\n### Gaussian Blur\n    result := blur.Gaussian(img, 3.0)\n\n\n![example](assets/img/gaussianblur.jpg)  \n\n\n## Channel\n    import \"github.com/anthonynsimon/bild/channel\"\n\n### Extract Channels\n    result := channel.Extract(img, channel.Alpha)\n\n![example](assets/img/extractchannel.jpg)\n\n### Extract Multiple Channels\n    result := channel.ExtractMultiple(img, channel.Red, channel.Alpha)\n\n## Effect\n    import \"github.com/anthonynsimon/bild/effect\"\n\n### Dilate\n    result := effect.Dilate(img, 3)\n\n![example](assets/img/dilate.jpg)     \n\n### Edge Detection\n    result := effect.EdgeDetection(img, 1.0)\n\n![example](assets/img/edgedetection.jpg)  \n\n### Emboss\n    result := effect.Emboss(img)\n\n![example](assets/img/emboss.jpg)  \n\n### Erode\n    result := effect.Erode(img, 3)\n\n![example](assets/img/erode.jpg)   \n\n### Grayscale\n    result := effect.Grayscale(img)\n\n![example](assets/img/grayscale.jpg)  \n\n### Invert\n    result := effect.Invert(img)\n\n![example](assets/img/invert.jpg)  \n\n### Median\n    result := effect.Median(img, 10.0)\n\n![example](assets/img/median.jpg)  \n\n### Sepia\n    result := effect.Sepia(img)\n\n![example](assets/img/sepia.jpg)  \n\n### Sharpen\n    result := effect.Sharpen(img)\n\n![example](assets/img/sharpen.jpg)  \n\n### Sobel\n    result := effect.Sobel(img)\n\n![example](assets/img/sobel.jpg)  \n\n### Unsharp Mask\n    result := effect.UnsharpMask(img, 0.6, 1.2)\n\n![example](assets/img/unsharpmask.jpg)  \n\n\n## Histogram\n    import \"github.com/anthonynsimon/bild/histogram\"\n\n### RGBA Histogram\n    hist := histogram.NewRGBAHistogram(img)\n    result := hist.Image()\n\n![example](assets/img/histogram.png)  \n\n\n## Noise\n    import \"github.com/anthonynsimon/bild/noise\"\n\n### Uniform colored\n    result := noise.Generate(280, 280, \u0026noise.Options{Monochrome: false, NoiseFn: noise.Uniform})\n\n![example](assets/img/noiseuniform.jpg)  \n\n\n### Binary monochrome\n    result := noise.Generate(280, 280, \u0026noise.Options{Monochrome: true, NoiseFn: noise.Binary})\n\n![example](assets/img/noisebinary.jpg)  \n\n\n### Gaussian monochrome\n    result := noise.Generate(280, 280, \u0026noise.Options{Monochrome: true, NoiseFn: noise.Gaussian})\n\n![example](assets/img/noisegaussian.jpg)  \n\n### Perlin Noise \n    result := noise.GeneratePerlin(280, 280, 0.25)\n![example](assets/img/perlin.jpg)  \n\n## Paint\n    import \"github.com/anthonynsimon/bild/paint\"\n\n### Flood Fill\n    // Fuzz is the percentage of maximum color distance that is tolerated\n    result := paint.FloodFill(img, image.Point{240, 0}, color.RGBA{255, 0, 0, 255}, 15)\n\n![example](assets/img/floodfill.jpg) \n\n\n## Segmentation\n    import \"github.com/anthonynsimon/bild/segment\"\n\n### Threshold\n    result := segment.Threshold(img, 128)\n\n![example](assets/img/threshold.jpg)\n\n\n## Transform\n    import \"github.com/anthonynsimon/bild/transform\"\n\n### Crop\n    // Source image is 280x280\n    result := transform.Crop(img, image.Rect(70,70,210,210))\n\n![example](assets/img/crop.jpg)\n\n### FlipH\n    result := transform.FlipH(img)\n\n![example](assets/img/fliph.jpg)  \n\n### FlipV\n    result := transform.FlipV(img)\n\n![example](assets/img/flipv.jpg) \n\n\n### Resize Resampling Filters\n    result := transform.Resize(img, 280, 280, transform.Linear)\n\n| Nearest Neighbor | Linear | Gaussian |\n|:----------: | :---------: | :------: |\n| ![](assets/img/resizenearestneighbor.jpg) | ![](assets/img/resizelinear.jpg) | ![](assets/img/resizegaussian.jpg) |\n| **Mitchell Netravali** | **Catmull Rom** | **Lanczos** |\n| ![](assets/img/resizemitchell.jpg) | ![](assets/img/resizecatmullrom.jpg) | ![](assets/img/resizelanczos.jpg) |\n\n\n### Rotate\n    // Options set to nil will use defaults (ResizeBounds set to false, Pivot at center)\n    result := transform.Rotate(img, -45.0, nil)\n\n![example](assets/img/rotation03.gif)\n\n    // If ResizeBounds is set to true, the full rotation bounding area is used\n    result := transform.Rotate(img, -45.0, \u0026transform.RotationOptions{ResizeBounds: true})\n\n![example](assets/img/rotation01.gif)\n\n    // Pivot coordinates are set from the top-left corner\n    // Notice ResizeBounds being set to default (false)\n    result := transform.Rotate(img, -45.0, \u0026transform.RotationOptions{Pivot: \u0026image.Point{0, 0}})\n\n![example](assets/img/rotation02.gif)\n\n### Shear Horizontal\n    result := transform.ShearH(img, 30)\n\n![example](assets/img/shearh.jpg)  \n\n### Shear Vertical\n    result := transform.ShearV(img, 30)\n\n![example](assets/img/shearv.jpg) \n\n### Translate\n    result := transform.Translate(img, 80, 0)\n\n![example](assets/img/translate.jpg) \n\n\n## Contribute\n\nWant to hack on the project? Any kind of contribution is welcome!  \nSimply follow the next steps:\n\n- Fork the project.\n- Create a new branch.\n- Make your changes and write tests when practical.\n- Commit your changes to the new branch.\n- Send a pull request, it will be reviewed shortly.\n\nIn case you want to add a feature, please create a new issue and briefly explain what the feature would consist of. \nFor bugs or requests, before creating an issue please check if one has already been created for it.\n\n\n## Changelog\n\nPlease see the [changelog](CHANGELOG.md) for more details.\n\n## License\n\nThis project is licensed under the MIT license. Please read the LICENSE file.\n","funding_links":[],"categories":["Images","Go","GoLang","Tool-kits \u0026 helpers","Relational Databases","圖象","Repositories","图像","图片","Images 图像处理","\u003cspan id=\"图片-images\"\u003e图片 Images\u003c/span\u003e"],"sub_categories":["Search and Analytic Databases","Advanced Console UIs","高級控制台界面","交流","检索及分析资料库","SQL 查询语句构建库","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","高级控制台界面"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonynsimon%2Fbild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthonynsimon%2Fbild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonynsimon%2Fbild/lists"}