{"id":44254071,"url":"https://github.com/cascable/stopkit","last_synced_at":"2026-02-10T16:01:57.736Z","repository":{"id":43612393,"uuid":"107649387","full_name":"Cascable/StopKit","owner":"Cascable","description":"Stop! In the name of light! 🎶 — A simple iOS and Mac framework for working with units of light.","archived":false,"fork":false,"pushed_at":"2024-05-31T12:55:57.000Z","size":80,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-07-18T13:06:57.979Z","etag":null,"topics":["ios","ios-sdk","mac","objective-c","photography","swift"],"latest_commit_sha":null,"homepage":"http://developer.cascable.se/","language":"Objective-C","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/Cascable.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-20T07:59:41.000Z","updated_at":"2024-05-31T12:55:50.000Z","dependencies_parsed_at":"2022-09-05T20:11:28.164Z","dependency_job_id":"e09b4a3c-17a4-421c-bd1b-4a21c05030fb","html_url":"https://github.com/Cascable/StopKit","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/Cascable/StopKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cascable%2FStopKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cascable%2FStopKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cascable%2FStopKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cascable%2FStopKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cascable","download_url":"https://codeload.github.com/Cascable/StopKit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cascable%2FStopKit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29306436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T15:37:45.286Z","status":"ssl_error","status_checked_at":"2026-02-10T15:37:41.567Z","response_time":65,"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":["ios","ios-sdk","mac","objective-c","photography","swift"],"created_at":"2026-02-10T16:01:56.926Z","updated_at":"2026-02-10T16:01:57.719Z","avatar_url":"https://github.com/Cascable.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n#  StopKit\n\n`StopKit` is a small iOS and Mac framework for working with units of light in photography. `StopKit` is fully compatible with both Objective-C and Swift.\n\nHere at Cascable, we use `StopKit` extensively — In our camera SDK [CascableCore](https://developer.cascable.se/), camera exposure properties such as shutter speed, aperture, exposure compensation, ISO, etc are all `StopKit` values, and our consumer app [Cascable](http://cascable.se/) uses `StopKit` to power its Shutter Robot automation tool.\n\n## Examples\n\n### Comparing Values\n\nWhen comparing values, `StopKit` provides `compare(_:)` and `stopsDifference(from:)`. Since you can't compare indeterminate values with determinate values, these methods can fail, returning `ExposureComparisonInvalid` or `nil`  respectively. You can use the `isDeterminate` property to exclude such values from calculations.\n\nIn general, a postive stops value means \"more light\" or \"a brighter image\", and a negative value means \"less light\" or \"a darker image\". However, `compare(_:)` will return a result that sorts the values into what the user would typically consider \"correct\" (for example, aperture values have the smallest number/largest stops value at the beginning of the list).\n\n```swift\n\nprint(ApertureValue.f8.stopsDifference(from: ApertureValue.f4))\n// -2 stops (since f8 lets less light through than f4)\n\nprint(ApertureValue.f8.compare(ApertureValue.f4).rawValue)\n// -1  (ComparisonResult.orderedAscending)\n\nprint(ApertureValue.f8.stopsDifference(from: ShutterSpeedValue.oneSecondShutterSpeed))\n// nil, since this isn't a valid comparison\n\nprint(ApertureValue.f8.compare(ShutterSpeedValue.oneSecondShutterSpeed).rawValue)\n// -100 (ExposureComparisonInvalid), since this isn't a valid comparison\n```\n\n\n### Transforming Values\n\nWhen transforming values, use the `-adding(_:)` method. Since you can't transform indeterminate values such as bulb shutter speeds or automatic values, this method can return `nil`. You can use the `isDeterminate` property to exclude such values from calculations.\n\nIn general, a postive stops value means \"more light\" or \"a brighter image\", and a negative value means \"less light\" or \"a darker image\".\n\n```swift\nlet stops = ExposureStops(fromDecimalValue: 1.0)\n\nlet f8 = ApertureValue.f8\nprint(f8.adding(stops)) // f/5.6\n\nlet one250th = ShutterSpeedValue.oneTwoHundredFiftiethShutterSpeed\nprint(one250th.adding(stops)) // 1/125\n\nlet iso100 = ISOValue.iso100\nprint(iso100.adding(stops)) // ISO 200\n\nlet zeroEV = ExposureCompensationValue.zeroEV\nprint(zeroEV.adding(stops)) // 1 EV\n```\n\n## License\n\nStopKit is licensed under the MIT license. For full details, see the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcascable%2Fstopkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcascable%2Fstopkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcascable%2Fstopkit/lists"}