{"id":21371858,"url":"https://github.com/only-icesoul/guiso","last_synced_at":"2025-03-16T08:43:06.109Z","repository":{"id":56915990,"uuid":"304053291","full_name":"Only-IceSoul/Guiso","owner":"Only-IceSoul","description":null,"archived":false,"fork":false,"pushed_at":"2021-01-02T17:53:37.000Z","size":14090,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T07:23:07.759Z","etag":null,"topics":["download","fetch","glide","http","image","ios"],"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/Only-IceSoul.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}},"created_at":"2020-10-14T15:13:08.000Z","updated_at":"2021-07-15T15:35:05.000Z","dependencies_parsed_at":"2022-08-20T21:20:25.012Z","dependency_job_id":null,"html_url":"https://github.com/Only-IceSoul/Guiso","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Only-IceSoul%2FGuiso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Only-IceSoul%2FGuiso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Only-IceSoul%2FGuiso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Only-IceSoul%2FGuiso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Only-IceSoul","download_url":"https://codeload.github.com/Only-IceSoul/Guiso/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243846982,"owners_count":20357297,"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":["download","fetch","glide","http","image","ios"],"created_at":"2024-11-22T08:15:40.595Z","updated_at":"2025-03-16T08:43:06.089Z","avatar_url":"https://github.com/Only-IceSoul.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Guiso\n[![Version](https://img.shields.io/cocoapods/v/Guiso.svg?style=flat)](https://cocoapods.org/pods/Guiso)\n[![License](https://img.shields.io/cocoapods/l/Guiso.svg?style=flat)](https://cocoapods.org/pods/Guiso)\n[![Platform](https://img.shields.io/cocoapods/p/Guiso.svg?style=flat)](https://cocoapods.org/pods/Guiso)\n\nGuiso is image loading framework for IOS that wraps media decoding, memory and disk caching.\nBy default Guiso uses URLSession. Supports fetching, decoding, and displaying video stills, images, and animated GIFs.\nGuiso's primary focus is on making scrolling any kind of a list of images as smooth and fast as possible, but Guiso is also effective for almost any case where you need to fetch, resize, and display a remote image.\n\n## Requirements\n\n```\n ios developer target 10.0\n```\n\n## Installation\n\nGuiso is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'JJGuiso'\n```\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n\n## Freatures\n\n- [x] url web\n- [x] uri\n- [x] asset local identifier\n- [x] Data\n- [x] Custom Model and loader\n- [x] Custom Transform\n- [x] Custon Animated Image Decoder\n- [x] Preload\n- [x] thumbanil,placeholder,error,fallback\n- [x] Options \n\n## Usage\n\nGuiso send result to View who implement protocol ViewTarget.\n\nUse GuisoView.\n\n```swift\nimport Guiso\n\nlet img = GuisoView()  // ViewTarget\nGuiso.load(url).into(img)\n\n//by default caching is disabled for Data object.\nGuiso.load(data).into(img)\n//There's no efficient way to compute a cache name for a byte array. \n// You can supply your own name using signature(). short names \"IMG_WA\\(self.count)\"\nGuiso.load(data).signature(\"IMG_WA001\").into(img)\n\n```\n\n### ViewTarget\n\nTargets are responsible for displaying loaded resources. GuisoView display gif and UIImage using ImageView. Users can also implement their own Targets.\n\n```swift\nclass MyViewTarget : ViewTarget {\n\n}\n```\n\n### **Transform**\n\nTransformations in Guiso take a resource, mutate it, and return the mutated resource. Typically transformations are used to crop or resize a UIImage, but they can also be used to transform animated GIFs.\n\n**fitCenter(aspectFit):**\nScales the image uniformly (maintaining the image's aspect ratio) so that one of the dimensions of the image will be equal to the given dimension and the other will be less than the given dimension.\n\n**centerCrop(aspectFill):**  \nScale the image so that either the width of the image matches the given width and the height of the image is greater than the given height or vice versa, and then crop the larger dimension to match the given dimension. Does not maintain the image's aspect ratio  \n\n\nApplying Transformations:\n\n```swift\nlet width = 200\nlet height = 200\nlet view = GuisoView()\n\nGuiso.load(url).fitCenter().override(width,height).into(view)\n\nGuiso.load(Data).centerCrop().override(width,height).into(view)\n\n```\n\n## Animated Gif \n\n```swift\n\nGuiso.load(\"url\").asAnimatedImage().into(myViewTarget) // gif\n\n```\n\n## Animated Webp\n\n```swift\n// use https://cocoapods.org/pods/JJGuisoWebP\n//create a class and implement AnimatedImageDecoderProtocol\nlet decoder:  AnimatedImageDecoderProtocol = MyClass()\nGuiso.load(\"url\").asAnimatedImage().animatedImageDecoder(decoder).into(myViewTarget) // gif\n\n```\n\n## Priority\n\nPriorities for completing loads. If more than one load is queued at a time, the load with the higher priority will be started first. Priorities are considered best effort, there are no guarantees about the order in which loads will start or finish.\n\n- background\n- low\n- normal\n- high\n\n## Header\n\nHeaders to load images \n\n```swift\n\nlet headers = GuisoHeader().addHeader(key:\"Authorization\",value:\"token\")\n\nGuiso.load(urlWeb).headers(headers).into(target)\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonly-icesoul%2Fguiso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonly-icesoul%2Fguiso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonly-icesoul%2Fguiso/lists"}