{"id":15170616,"url":"https://github.com/alladinian/histogramview","last_synced_at":"2025-10-25T19:30:57.323Z","repository":{"id":63902949,"uuid":"419376072","full_name":"alladinian/HistogramView","owner":"alladinian","description":"A SwiftUI view for displaying image histograms","archived":false,"fork":false,"pushed_at":"2021-10-20T16:08:50.000Z","size":8,"stargazers_count":28,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-31T10:11:33.392Z","etag":null,"topics":["graphics","histogram","image","ios","macos","swift","swiftui"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/alladinian.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}},"created_at":"2021-10-20T14:58:14.000Z","updated_at":"2024-07-01T12:53:42.000Z","dependencies_parsed_at":"2023-01-14T13:00:19.602Z","dependency_job_id":null,"html_url":"https://github.com/alladinian/HistogramView","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alladinian%2FHistogramView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alladinian%2FHistogramView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alladinian%2FHistogramView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alladinian%2FHistogramView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alladinian","download_url":"https://codeload.github.com/alladinian/HistogramView/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238200772,"owners_count":19433098,"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":["graphics","histogram","image","ios","macos","swift","swiftui"],"created_at":"2024-09-27T08:04:16.708Z","updated_at":"2025-10-25T19:30:57.036Z","avatar_url":"https://github.com/alladinian.png","language":"Swift","readme":"![HistogramView](https://user-images.githubusercontent.com/156458/138126267-b1799ab2-87fe-4e7a-86bd-e36cdd9aa6bd.png)\n\n# HistogramView\n\nA SwiftUI view for displaying image histograms.\n\n## How do I use it?\n\nIt's as simple as:\n``` swift\nHistogramView(image: myImage)\n```\n\n*Note:* Both `UIImage` \u0026 `NSImage` are supported (by the `HistogramImage` typealias, depending on the platform).\n\n## What options do I have for configuration?\n\nThe initializer supports channel opacity, blendMode and scale for the final graph.\n\n``` swift\n/// The opacity of each channel layer. Default is `1`\npublic let channelOpacity: CGFloat\n\n/// The blend mode for the channel layers. Default is `.screen`\npublic let blendMode: BlendMode\n\n/// The scale of each layer. Default is `1`\npublic let scale: CGFloat\n```\n\n## How fast is this thing?\n\nUnder the hood the histogram calculation is performed by `Accelerate`'s `vImageHistogramCalculation_ARGB8888` for RGB channels, so it's pretty fast actually.\nFast enough to be perfomed synchronously (although didn't test it on gigantic images).\n\n## How is the graph curve produced?\n\nEach channel is a `SwiftUI` `Path` that uses [Hermite interpolation](https://en.wikipedia.org/wiki/Hermite_interpolation) for generating a continous curve.\nThe actual implementation for the interpolator is taken from [@FlexMonkey's implementation](https://github.com/FlexMonkey/Filterpedia/blob/7a0d4a7070894eb77b9d1831f689f9d8765c12ca/Filterpedia/components/HistogramDisplay.swift#L228) (part of the [Filterpedia](https://github.com/FlexMonkey/Filterpedia) project) and adapted to be used on `Path` instead of `UIBezierPath`.\n\n\n## Authors\nVasilis Akoinoglou, alladinian@gmail.com  \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falladinian%2Fhistogramview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falladinian%2Fhistogramview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falladinian%2Fhistogramview/lists"}