{"id":21903874,"url":"https://github.com/hansemannn/titanium-image-crop","last_synced_at":"2025-04-15T20:44:21.525Z","repository":{"id":47081391,"uuid":"175601344","full_name":"hansemannn/titanium-image-crop","owner":"hansemannn","description":"An easy to use iOS image cropping tool based on TOCropViewController.","archived":false,"fork":false,"pushed_at":"2021-10-11T13:11:32.000Z","size":18446,"stargazers_count":40,"open_issues_count":2,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T01:12:03.634Z","etag":null,"topics":["appcelerator","image-cropping","javascript","native","titanium"],"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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hansemannn.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":"2019-03-14T10:38:57.000Z","updated_at":"2023-08-09T23:16:42.000Z","dependencies_parsed_at":"2022-09-03T17:22:34.177Z","dependency_job_id":null,"html_url":"https://github.com/hansemannn/titanium-image-crop","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansemannn%2Ftitanium-image-crop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansemannn%2Ftitanium-image-crop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansemannn%2Ftitanium-image-crop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansemannn%2Ftitanium-image-crop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hansemannn","download_url":"https://codeload.github.com/hansemannn/titanium-image-crop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249152029,"owners_count":21221168,"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":["appcelerator","image-cropping","javascript","native","titanium"],"created_at":"2024-11-28T15:29:52.773Z","updated_at":"2025-04-15T20:44:21.502Z","avatar_url":"https://github.com/hansemannn.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Titanium Image Cropping Tool\n\nAn easy to crop images to different scales. Based on the awesome [TOCropViewController](https://github.com/TimOliver/TOCropViewController) library. Currently iOS only (!)\n\n\u003cimg src=\"./example.png\" height=\"600\" alt=\"Example Screenshot\" /\u003e\n\u003cimg src=\"./IMG_0827.PNG\" height=\"600\" alt=\"Example Screenshot rounded cropping\" /\u003e\n\n## Requirements\n\n- [x] Titanium SDK 9.2.0+ (this module  is 100 % Swift based)\n\n## Methods\n\n### `showCropDialog`\n\n#### Parameters\n\n- `image` (String, Ti.Blob, Ti.File)\n- `croppingStyle` 'circular' or 'default' (String) in not set 'default' is selected\n\n- `aspectRatio` (either a dictionary {x, y}  of the ratio or one of the constants * below)\n\n## Constants\n\n- `ASPECT_RATIO_SQUARE`\n- `ASPECT_RATIO_3x2`\n- `ASPECT_RATIO_5x3`\n- `ASPECT_RATIO_4x3`\n- `ASPECT_RATIO_5x4`\n- `ASPECT_RATIO_7x5`\n- `ASPECT_RATIO_16x9`\n\n## Events\n\n- `done`\n  - Attributes: `image` (Ti.Blob, if finished cropping), `cancel` (`true` if cancelled, `false` if completetd)\n- `close`\n\n## Notes\n\n- If opening the image crop dialog from a modal window, please set the `modalStyle: Ti.UI.iOS.MODAL_PRESENTATION_OVER_CURRENT_FULL_SCREEN` property (thanks to [designbymind](https://github.com/designbymind)!)\n\n## Example\n\n```js\nimport ImageCrop from 'ti.imagecrop';\n\nImageCrop.addEventListener('done', event =\u003e {\n  if (event.cancel) {\n    return;\n  }\n\n  win.add(Ti.UI.createImageView({ height: 400, image: event.image }));\n});\n\nImageCrop.addEventListener('close', event =\u003e {\n  // Open other windows after the close has been triggered\n  // to prevent transition glitches\n});\n\nconst win = Ti.UI.createWindow({\n  backgroundColor: '#fff'\n});\n\nconst btn = Ti.UI.createButton({\n  title: 'Show crop dialog'\n});\n\nbtn.addEventListener('click', () =\u003e {\n  ImageCrop.showCropDialog({\n    image: 'test.jpg'\n  });\n});\n\nwin.add(btn);\nwin.open();\n```\n\n## License\n\nMIT\n\n## Author\n\nHans Knöchel\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansemannn%2Ftitanium-image-crop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhansemannn%2Ftitanium-image-crop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansemannn%2Ftitanium-image-crop/lists"}