{"id":15170580,"url":"https://github.com/andylindebros/profileimageeditor","last_synced_at":"2026-01-25T00:02:21.579Z","repository":{"id":254191061,"uuid":"845766647","full_name":"andylindebros/ProfileImageEditor","owner":"andylindebros","description":"Create Profile images to use in your Swift/SwiftUI project","archived":false,"fork":false,"pushed_at":"2024-08-22T14:42:32.000Z","size":4978,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T01:37:39.287Z","etag":null,"topics":["editor","imagemanipulation","profileimage","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andylindebros.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":"2024-08-21T22:23:23.000Z","updated_at":"2024-12-19T17:29:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"d18ad301-22c8-4770-8531-fbb5ae8d12e2","html_url":"https://github.com/andylindebros/ProfileImageEditor","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"150f9fd63854089be0eef5ace46bcf430476edae"},"previous_names":["andylindebros/profileimageeditor"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andylindebros%2FProfileImageEditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andylindebros%2FProfileImageEditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andylindebros%2FProfileImageEditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andylindebros%2FProfileImageEditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andylindebros","download_url":"https://codeload.github.com/andylindebros/ProfileImageEditor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239221266,"owners_count":19602378,"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":["editor","imagemanipulation","profileimage","swift","swiftui"],"created_at":"2024-09-27T08:04:09.828Z","updated_at":"2026-01-25T00:02:21.561Z","avatar_url":"https://github.com/andylindebros.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ProfileImageEditor\nProfileImageEditor is a Swift package designed for creating custom profile images based on a specified view and its dimensions. Users can select a photo from their photo library and easily adjust its composition by dragging the image within the view to achieve the desired layout. Once the layout is finalized, the package will generate a new image with your desired dimensions, which can then be exported for use in your project.\n\n![ProfileImageEditor](./demo.gif)\n## Installation\n1. In Xcode, with your app project open, navigate to `File \u003e Add Packages`.\n1. When prompted, add the Firebase Apple platforms SDK repository:\n``` \nhttps://github.com/andylindebros/profile-image-editor\n```\n3. Select the SDK version that you want to use.\n\nWhen finished, Xcode will automatically begin resolving and downloading your dependencies in the background.\n\n## Implementation\nAdd the ProfileImageEditor to desired SwiftUI view.\n\n``` Swift\nimport Combine\nimport ProfileImageEditor\n\nclass ContentViewModel: ObservableObject {\n    init() {\n        profileImageEditorViewModel = ProfileImageEditorViewModel()\n        subscriber = profileImageEditorViewModel.imageExportAction.sink { [weak self] model in\n            // Save or integrate the exported images with your project here.\n        }\n    }\n\n    private var subscriber: Cancellable?\n    let profileImageEditorViewModel: ProfileImageEditorViewModel\n}\n\nstruct ContentView: View {\n    @ObservedObject var viewModel = ContentViewModel()\n\n    // The aspect ratio should be 1:1 so we specify width and height with this value\n    let exportSize: CGFloat = 100\n\n    var body: some View {\n        ZStack {\n            ProfileImageEditor(viewModel: viewModel.profileImageEditorViewModel)\n                .padding()\n            VStack {\n                Spacer()\n                Button(action: {\n                    viewModel.profileImageEditorViewModel.dispatch(.exportImage(withSize: exportSize))\n                }) {\n                    Text(\"Export\")\n                }\n            }\n        }\n    }\n}\n```\n\n## Export Images\nThe Export delivery model generates two UIImages: the original image and a resized version with the specified dimensions. Both images maintain a 1:1 aspect ratio.\n\n## Example project\nExplore the example project included in this package to learn more about how the ProfileImageEditor works.\n\nLet me know what you think and drop me a line: andylindebros@gmail.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandylindebros%2Fprofileimageeditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandylindebros%2Fprofileimageeditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandylindebros%2Fprofileimageeditor/lists"}