{"id":18270543,"url":"https://github.com/jberlana/JBCroppableView","last_synced_at":"2025-04-05T01:30:41.199Z","repository":{"id":6125485,"uuid":"7353700","full_name":"jberlana/JBCroppableView","owner":"jberlana","description":"JBCroppableView is a subclass of UIView built with UIKit and CoreGraphics that adds n points on an UIImageView allowing to modify them by drag \u0026 drop to trim the extra space of an image.","archived":false,"fork":false,"pushed_at":"2013-12-05T09:28:48.000Z","size":585,"stargazers_count":352,"open_issues_count":7,"forks_count":89,"subscribers_count":32,"default_branch":"master","last_synced_at":"2024-11-05T11:52:57.644Z","etag":null,"topics":[],"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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jberlana.png","metadata":{"files":{"readme":"README.md","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":"2012-12-28T11:40:59.000Z","updated_at":"2024-08-27T09:31:28.000Z","dependencies_parsed_at":"2022-08-30T16:20:42.995Z","dependency_job_id":null,"html_url":"https://github.com/jberlana/JBCroppableView","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/jberlana%2FJBCroppableView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jberlana%2FJBCroppableView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jberlana%2FJBCroppableView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jberlana%2FJBCroppableView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jberlana","download_url":"https://codeload.github.com/jberlana/JBCroppableView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276022,"owners_count":20912285,"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:38:42.479Z","updated_at":"2025-04-05T01:30:40.556Z","avatar_url":"https://github.com/jberlana.png","language":"Objective-C","funding_links":[],"categories":["etc"],"sub_categories":[],"readme":"JBCroppableImageView\n====================\n\nJBCroppableImageView is a subclass of UIImageView built with UIKit and\nCoreGraphics that adds n points on an image allowing to modify them by drag \u0026\ndrop to trim the extra space of an image.\n\nFeatures \n-------------------------------------------------\n\n* Add an NSArray of specific CGPoints to a UIImageView. * Add a specific number of points. * Drag\u0026Drop of the points. * Crops the UIImage in a UIImageView. * Respects aspect ratio. * ARC(Automatic Reference Counting) support.\n\n\nInstallation\n-------------------------------------------------\n\n * Drag the *JBCroppableImageView*/*JBCroppableLayer* files into your project. * Add the CoreGraphics framework to your project.\n\nUsage (see example Xcode project in /TestCroping)\n-------------------------------------------------\n\nto set up, initialize how you would a reular UIImageView:\n\n\u003ccode\u003e-JBCroppableImageView *cropView = [[JBCroppableImageView alloc]\ninitWithImage:[UIImage imageNamed:”demo”]];\u003c/code\u003e\n\nit will be initialized with four crop points. To add or subtract the number of\npoints:\n\n\u003ccode\u003e[cropView addPoint];\u003c/code\u003e\n\u003ccode\u003e[cropView removePoint];\u003c/code\u003e\n\n\nto crop the imageView to the requested shape or to revert back to uncropped\nstate:\n\n\u003ccode\u003e[cropView crop];\u003c/code\u003e\n\u003ccode\u003e[cropView reverseCrop];\u003c/code\u003e\n\n\nto retrieve the cropped image:\n\n\u003ccode\u003e[cropView getCroppedImage];\u003c/code\u003e\n\u003ccode\u003e[cropView getCroppedImageWithTransparentBorder:YES];\u003c/code\u003e\n\n\n*the image property of JBCroppableImageView remains as the original image\n\n\nDemo\n----\n\n![image](\u003chttps://github.com/jberlana/JBCroppableView/raw/master/demo.png\u003e)\n\nCredit Javier Berlana, [Mobile One2One](\u003chttp://www.mo2o.com/\u003e)\n---------------------------------------------------------------\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjberlana%2FJBCroppableView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjberlana%2FJBCroppableView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjberlana%2FJBCroppableView/lists"}