{"id":18271665,"url":"https://github.com/mattgemmell/MGImageUtilities","last_synced_at":"2025-04-05T02:30:37.494Z","repository":{"id":965569,"uuid":"757403","full_name":"mattgemmell/MGImageUtilities","owner":"mattgemmell","description":"Useful UIImage categories for iPhone/iPad developers.","archived":false,"fork":false,"pushed_at":"2012-11-26T17:20:27.000Z","size":203,"stargazers_count":826,"open_issues_count":7,"forks_count":143,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-04-04T02:09:17.342Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://mattgemmell.com/","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattgemmell.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-07-05T08:37:04.000Z","updated_at":"2025-04-02T15:15:38.000Z","dependencies_parsed_at":"2022-07-15T05:46:14.932Z","dependency_job_id":null,"html_url":"https://github.com/mattgemmell/MGImageUtilities","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattgemmell%2FMGImageUtilities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattgemmell%2FMGImageUtilities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattgemmell%2FMGImageUtilities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattgemmell%2FMGImageUtilities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattgemmell","download_url":"https://codeload.github.com/mattgemmell/MGImageUtilities/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247279229,"owners_count":20912848,"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":[],"created_at":"2024-11-05T11:39:26.595Z","updated_at":"2025-04-05T02:30:36.956Z","avatar_url":"https://github.com/mattgemmell.png","language":"Objective-C","readme":"MGImageUtilities\n================\n\nThis is a demo project (for iPhone, but the code will work just fine on iPad too) showing two categories on UIImage, as described below.\n\n\nUIImage+ProportionalFill\n------------------------\n\nThis category lets you resize an arbitrary image to fit into an arbitrary size, using one of four resizing methods:\n\n- Scale: scales the image proportionally to fit entirely into the required size.\n- Crop: scales the image proportionally to completely fill the required size, cropping towards its center. This is the most useful method.\n- Start: as for Crop, but crops towards the \"start\" of the image (the top or left, depending on relative aspect ratios).\n- End: as for Crop, but crops towards the \"end\" of the image (the bottom or right, depending on relative aspect ratios).\n\nThis is very useful for caching on-screen-sized versions of images, and generating appropriate images for use on a Retina Display. The category will do the right thing based on the image's orientation metadata, and the scale factor of the device's main screen (i.e. it'll look sharp on high-resolution devices like an iPhone 4).\n\n\nUIImage+Tint\n------------\n\nThis category takes an image (presumably flat and solid-coloured, like a toolbar icon), and fills its non-transparent pixels with a given colour. You can optionally also specify a fractional opacity at which to composite the original image over the colour-filled region, to give a tinting effect.\n\nThis is very useful for generating multiple different-coloured versions of the same image, for example 'disabled' or 'highlighted' states of the same basic image, without having to make multiple different-coloured bitmap image files.\n\n\nLicense\n-------\n\nThe license for the code is included with this project; it's basically a BSD license with attribution.\n\nI can't answer any questions about how to use the code, but I always welcome emails telling me that you're using it or just saying thanks. I hope you find it useful!\n\n\nCheers,  \nMatt Legend Gemmell  \nhttp://mattgemmell.com/  \n","funding_links":[],"categories":["etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattgemmell%2FMGImageUtilities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattgemmell%2FMGImageUtilities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattgemmell%2FMGImageUtilities/lists"}