{"id":22694800,"url":"https://github.com/kosoku/loki","last_synced_at":"2025-04-13T01:22:54.851Z","repository":{"id":18513039,"uuid":"84496066","full_name":"Kosoku/Loki","owner":"Kosoku","description":"Loki is an iOS/macOS/tvOS/watchOS framework for manipulating UIImage/NSImage.","archived":false,"fork":false,"pushed_at":"2022-10-06T18:20:23.000Z","size":8187,"stargazers_count":4,"open_issues_count":4,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-09-17T21:50:22.727Z","etag":null,"topics":["image-processing","ios","macos","tvos","watchos"],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kosoku.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-09T22:49:58.000Z","updated_at":"2024-02-28T02:29:52.000Z","dependencies_parsed_at":"2022-08-30T09:11:44.737Z","dependency_job_id":null,"html_url":"https://github.com/Kosoku/Loki","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kosoku%2FLoki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kosoku%2FLoki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kosoku%2FLoki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kosoku%2FLoki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kosoku","download_url":"https://codeload.github.com/Kosoku/Loki/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228996052,"owners_count":18003633,"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-processing","ios","macos","tvos","watchos"],"created_at":"2024-12-10T03:09:57.730Z","updated_at":"2024-12-10T03:09:58.486Z","avatar_url":"https://github.com/Kosoku.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Loki\n\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Version](http://img.shields.io/cocoapods/v/Loki.svg)](http://cocoapods.org/?q=Loki)\n[![Platform](http://img.shields.io/cocoapods/p/Loki.svg)]()\n[![License](http://img.shields.io/cocoapods/l/Loki.svg)](https://github.com/Kosoku/Loki/blob/master/license.txt)\n\n*Loki* is an iOS/macOS/tvOS/watchOS framework for manipulating `UIImage`/`NSImage`. Methods to resize, tint, highlight, blur, and adjust contrast, brightness or saturation are provided on iOS/macOS/tvOS. A subset of the methods are available on watchOS because of their reliance on the `Accelerate` framework.\n\nAdditional methods are provided to render images from PDF source documents, given a specific width, height, or size, provided the PDF name, bundle or URL.\n\n### Installation\n\nYou can install *Loki* using [cocoapods](https://cocoapods.org/), [Carthage](https://github.com/Carthage/Carthage), or as a framework.\n\n### Dependencies\n\nApple:\n\n- `Accelerate`, `iOS`, `macOS`, and `tvOS`\n\n### Examples\n\nHighlight an image:\n\n```objc\n// assume image exists\nUIImage *image = ...;\n\n// the image will have a partially transparent orange tint applied over it\nimage = [image KLO_imageByHighlightingWithColor:[UIColor.orangeColor colorWithAlphaComponent:0.25]];\n```\n\nTint an image:\n\n```objc\n// assume image exists\nUIImage *image = ...;\n\n// the image will have its opaque pixels colored orange\nimage = [image KLO_imageByTintingWithColor:UIColor.orangeColor];\n```\n\nResize an image:\n\n```objc\n// assume image exists\nUIImage *image = ...;\n\n// the image will be resized to the provided size and its aspect ratio will be maintained\nimage = [image KLO_imageByResizingToSize:CGSizeMake(25, 25) maintainAspectRatio:YES];\n```\n\nBlur an image:\n\n```objc\n// assume image exists\nUIImage *image = ...;\n\n// the image will be blurred using a box blur with the provided radius\nimage = [image KLO_imageByBlurringWithRadius:25.0];\n```\n\nGenerate PDF images:\n\n```objc\n// image with the provided name in the main bundle scaled to the provided width and automatically determined height\nUIImage *image = [UIImage KLO_imageWithPDFNamed:@\"image\" width:100];\n```\n\n```objc\n// image with the provided name in the main bundle scaled to the provided height and automatically determined width\nUIImage *image = [UIImage KLO_imageWithPDFNamed:@\"image\" height:100];\n```\n\n```objc\n// image with the provided name in the main bundle scaled to the provided size\nUIImage *image = [UIImage KLO_imageWithPDFNamed:@\"image\" size:CGSizeMake(25, 25)];\n```\n\nThere are numerous other method PDF related methods. See *UIImage+KLOPDFExtensions.h* and *NSImage+KLOPDFExtensions.h* for full method listing.\n\n### Demo\n\nThe various demo targets in the workspace provide further examples of the image and PDF related methods in action.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkosoku%2Floki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkosoku%2Floki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkosoku%2Floki/lists"}