{"id":18308522,"url":"https://github.com/heroesofcode/magicimages","last_synced_at":"2025-04-05T17:32:17.025Z","repository":{"id":41877569,"uuid":"364678209","full_name":"heroesofcode/MagicImages","owner":"heroesofcode","description":"Magic Image is a library to facilitate the development of the image in various ways for iOS \u0026 tvOS","archived":false,"fork":false,"pushed_at":"2024-04-10T11:05:09.000Z","size":5206,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-10T12:25:52.551Z","etag":null,"topics":["image","ios","ios-swift","swift-package-manager","tvos"],"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/heroesofcode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-05-05T18:58:05.000Z","updated_at":"2024-07-22T02:40:26.425Z","dependencies_parsed_at":"2023-09-29T02:07:54.022Z","dependency_job_id":"957e5217-c145-4d5f-96ea-266ed57c0094","html_url":"https://github.com/heroesofcode/MagicImages","commit_stats":{"total_commits":94,"total_committers":2,"mean_commits":47.0,"dds":0.06382978723404253,"last_synced_commit":"26c13426c18c054e1fe9e75f23ae2eaafdfb10bb"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroesofcode%2FMagicImages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroesofcode%2FMagicImages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroesofcode%2FMagicImages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroesofcode%2FMagicImages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heroesofcode","download_url":"https://codeload.github.com/heroesofcode/MagicImages/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247375041,"owners_count":20928938,"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":["image","ios","ios-swift","swift-package-manager","tvos"],"created_at":"2024-11-05T16:08:17.259Z","updated_at":"2025-04-05T17:32:12.296Z","avatar_url":"https://github.com/heroesofcode.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/heroesofcode/MagicImages/blob/main/assets/logo.png?raw=true\"\u003e\n\u003c/p\u003e\n\n[![CI](https://github.com/heroesofcode/MagicImages/actions/workflows/CI.yml/badge.svg)](https://github.com/heroesofcode/MagicImages/actions/workflows/CI.yml)\n[![SPM compatible](https://img.shields.io/badge/SPM-compatible-brightgreen)](https://swift.org/package-manager)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fheroesofcode%2FMagicImages%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/heroesofcode/MagicImages)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fheroesofcode%2FMagicImages%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/heroesofcode/MagicImages)\n[![License](https://img.shields.io/github/license/joaolfp/ViewState.svg)](https://github.com/joaolfp/DataLife/blob/master/LICENSE)\n\n## Overview\n\n- [x] A library to facilitate the development of the image in various ways.\n- [x] Provides caching support.\n- [x] SwiftUI support.\n\n## Requirements\n\n- iOS 13.0+ / tvOS 13.0+ / visionOS 1.0+\n\n## Usage\n\n#### First Example\nYou can use it to view an image through a url, follow the example below\n\n\u003cimg src=\"https://github.com/heroesofcode/MagicImages/blob/main/assets/start.png\" width=\"310\" height=\"680\" /\u003e\n\n```swift\nMagicImages(image: imageView)\n    .start(url: \"IMAGE URL\")\n    \n// OR\n\nMagicImages(image: imageView)\n    .start(url: \"IMAGE URL\", placeholder: \"PhotoLocal\")\n\n// OR\n    \nMagicImages(image: imageView)\n    .start(name: \"IMAGE NAME\")\n    \n// OR\n    \nMagicImages(image: imageView)\n    .start(uiImage: UIImage(systemName: \"heart.fill\"))\n```\n\n#### Example SwiftUI\n\n```swift\nvar body: some View {\n     MagicImagesUI(url: \"www.example.com/image.jpg\")\n        .frame(width: 300, height: 300)\n        .cornerRadius(20)\n}\n```\n\n#### Second Example\nYou can use it to view a circular image. Measure is the width and height, follow the example below. Here you don't need to put width and height in the constraint, in the measure parameter Magic Images is already doing that.\n\n\u003cimg src=\"https://github.com/heroesofcode/MagicImages/blob/main/assets/circle.png\" width=\"310\" height=\"680\" /\u003e\n\n```swift\nMagicImages(image: imageView)\n    .start(url: \"IMAGE URL\")\n    .isCircle(measure: 100)\n```\n\n#### Third Example\nYou can use it to see an image with rounded edges. \u003cb\u003eMeasure\u003c/b\u003e is rounded edges, follow the example below\n\n\u003cimg src=\"https://github.com/heroesofcode/MagicImages/blob/main/assets/rounded.png\" width=\"310\" height=\"680\" /\u003e\n\n```swift\nMagicImages(image: imageView)\n    .start(url: \"IMAGE URL\")\n    .isRounded(measure: 20)\n```\n\n#### Last Example\nYou can use it to see an image with some sides of the rounded edges. \u003cb\u003eMeasure\u003c/b\u003e is rounded edges, follow the example below\n\n\u003cimg src=\"https://github.com/heroesofcode/MagicImages/blob/main/assets/sides.png\" width=\"310\" height=\"680\" /\u003e\n\n```swift\nMagicImages(image: imageView)\n    .start(url: \"IMAGE URL\")\n    .isSides([.topLeft, .bottomRight], measures: 50)\n```\n\n## Installation\n\n### [Swift Package Manager (SPM)](https://swift.org/package-manager)\n\n```swift\nimport PackageDescription\nlet package = Package(\n    name: \"\u003cYour Product Name\u003e\",\n    dependencies: [\n       .package(url: \"https://github.com/heroesofcode/MagicImages\", .upToNextMajor(from: \"1.6.0\"))\n    ],\n    targets: [\n        .target(\n            name: \"\u003cYour Target Name\u003e\",\n            dependencies: [\"MagicImages\"]),\n    ]\n)\n```\n\n## Contributing\n\nTo contribute, just fork this project and then open a pull request, feel free to contribute, bring ideas and raise any problem in the issue tab.\n\n## License\n\nMagicImages is released under the MIT license. See [LICENSE](https://github.com/heroesofcode/MagicImages/blob/feature/add-contributors/LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheroesofcode%2Fmagicimages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheroesofcode%2Fmagicimages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheroesofcode%2Fmagicimages/lists"}