{"id":20727957,"url":"https://github.com/mobilehero-archive/titanium-imagefactory","last_synced_at":"2025-04-23T19:34:06.335Z","repository":{"id":42232834,"uuid":"194322100","full_name":"mobilehero-archive/titanium-imagefactory","owner":"mobilehero-archive","description":"Axway Amplify module for image transformation - scale, crop, and compress images - for Appcelerator Titanium Mobile","archived":false,"fork":false,"pushed_at":"2023-05-17T04:35:21.000Z","size":1085,"stargazers_count":3,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T02:51:06.929Z","etag":null,"topics":["amplify","android","api-builder","appcelerator","axway","axway-amplify","axway-sdk","brenton-house","ios","mobile","native","titanium","titanium-alloy","titanium-mobile","titanium-module","titanium-sdk"],"latest_commit_sha":null,"homepage":"https://brenton.house/saying-goodbye-to-axway-amplify-titanium-31a44f3671de","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mobilehero-archive.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-28T19:08:02.000Z","updated_at":"2022-01-10T19:56:36.000Z","dependencies_parsed_at":"2024-11-22T08:32:56.561Z","dependency_job_id":null,"html_url":"https://github.com/mobilehero-archive/titanium-imagefactory","commit_stats":null,"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobilehero-archive%2Ftitanium-imagefactory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobilehero-archive%2Ftitanium-imagefactory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobilehero-archive%2Ftitanium-imagefactory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobilehero-archive%2Ftitanium-imagefactory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mobilehero-archive","download_url":"https://codeload.github.com/mobilehero-archive/titanium-imagefactory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250499939,"owners_count":21440718,"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":["amplify","android","api-builder","appcelerator","axway","axway-amplify","axway-sdk","brenton-house","ios","mobile","native","titanium","titanium-alloy","titanium-mobile","titanium-module","titanium-sdk"],"created_at":"2024-11-17T04:34:59.924Z","updated_at":"2025-04-23T19:34:06.309Z","avatar_url":"https://github.com/mobilehero-archive.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[//]: # (header-start)\n\n\u003ch1 align=\"center\"\u003e\n\t\u003ca href=\"https://blog.axway.com/mobile-apps/changes-to-application-development-services\"\u003e\n\t\tPreparing for end of Axway\n\t\u003c/a\u003e\t\n\u003c/h1\u003e\n\u003ch2 align=\"center\"\u003e\n\t👇 \u0026nbsp; support for Amplify Cloud and Mobile   \u0026nbsp; 👇\n\u003c/h2\u003e\t\n\n\u003ca href=\"https://brenton.house/saying-goodbye-to-axway-amplify-titanium-31a44f3671de\"\u003e\n\t\u003cp align=\"center\"\u003e\n\t\t\u003cimg src=\"https://cdn.secure-api.org/images/RIP-Axway-Amplify-Titanium.png\" alt=\"RIP Axway Amplify Titanium (2010 - 2022)\" width=\"80%\" /\u003e\n\t\u003c/p\u003e\n\u003c/a\u003e\t\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://blog.axway.com/mobile-apps/changes-to-application-development-services\"\u003e\n\t\t\t🪦 \u0026nbsp; RIP Axway Amplify Titanium (2010 - 2022)\n\t\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://blog.axway.com/mobile-apps/prepare-your-apps-for-appcelerator-end-of-support\"\u003e\n\t\t\t🪦 \u0026nbsp; RIP Axway Amplify Cloud Services (2012 - 2022)\n\t\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://blog.axway.com/mobile-apps/prepare-your-apps-for-appcelerator-end-of-support\"\u003e\n\t\t\t🪦 \u0026nbsp; RIP Axway Amplify Crash Analytics (2015 - 2022)\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n\u003chr\u003e\n\u003ch4 align=\"center\"\u003e\n🛑 \u0026nbsp;\u0026nbsp; \u003ca href=\"https://blog.axway.com/mobile-apps/prepare-your-apps-for-appcelerator-end-of-support\"\u003eAxway support for Amplify products has ended\u003c/a\u003e for most products related to mobile and cloud. \n\u003c/h4\u003e\n\n\u003ch4 align=\"center\"\u003e\nA few of the open-source versions of Axway Amplify products will live on after \u003ca href=\"\"\u003eAxway Amplify End-of-Life\u003c/a\u003e (EOL) announcements.  However, all closed-source projects and most open-source projects are now dead.  \n\t\u003c/h4\u003e\n\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\n\u003e 👉 \u0026nbsp;\u0026nbsp; A group of Axway employees, ex-Axway employees, and some developers from Titanium community have created a legal org and now officially decide all matters related to future of these products.  \n\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003chr\u003e\n\n\n## API FAQ:\n\n* [API Best Practices](https://brenton.house)\n* [What is API Security?](https://brenton.house/what-is-api-security-5ca8117d4911)\n* [OWASP Top 10 List for API Security](https://www.youtube.com/watch?v=GLVHDj0Cpg4)\n* [What is API Security?](https://brenton.house/what-is-api-security-5ca8117d4911)\n* [Top API Trends for 2022](https://brenton.house/top-10-api-integration-trends-for-2022-49b05f2ef299)\n* [What is a Frankenstein API?](https://brenton.house/what-is-a-frankenstein-api-4d6e59fca6)\n* [What is a Zombie API?](https://brenton.house/what-is-a-zombie-api-6e5427c39b6a)\n* [API Developer Experience](https://brenton.house/keys-to-winning-with-an-awesome-api-developer-experience-62dd2fa668f4)\n* [API Cybersecurity 101](https://brenton.house/what-is-api-security-5ca8117d4911)\n* [YouTube API Videos](https://youtube.com/brentonhouse)\n* [YouTube API Shorts Videos](https://youtube.com/apishorts)\n\n\u0026nbsp;\n\n[![Click to watch on Youtube](https://img.youtube.com/vi/GLVHDj0Cpg4/0.jpg)](https://www.youtube.com/watch?v=GLVHDj0Cpg4\u0026list=PLsy9MwYlG1pew6sktCAIFD5tbrXy9HUQ7  \"Click to watch on YouTube\")\n\n\n\u003e \u0026nbsp; [↑ Watch video on YouTube ↑](https://www.youtube.com/watch?v=GLVHDj0Cpg4\u0026list=PLsy9MwYlG1pew6sktCAIFD5tbrXy9HUQ7)\n\n\u0026nbsp;\n\n\n\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003chr\u003e\n\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\n[//]: # (header-end)\n\n# @titanium/imagefactory\n\n[![@titanium/imagefactory](https://img.shields.io/npm/v/@titanium/imagefactory.png)](https://www.npmjs.com/package/@titanium/imagefactory)\n[![Dependabot Status](https://api.dependabot.com/badges/status?host=github\u0026repo=brentonhouse/titanium-imagefactory)](https://dependabot.com)\n\n\n\n\u003e Titanium native mobile image transformation functions including the ability to scale, crop, and compress images.\n\n* [API FAQ:](#api-faq)\n* [📝 Description](#-description)\n* [🚀 Getting Started](#-getting-started)\n* [Accessing the @titanium/imagefactory Module](#accessing-the-titaniumimagefactory-module)\n\t* [Methods](#methods)\n\t\t* [imageWithRotation(blob, options)](#imagewithrotationblob-options)\n\t\t\t* [Arguments](#arguments)\n\t\t* [imageWithAlpha(blob, options)](#imagewithalphablob-options)\n\t\t\t* [Arguments](#arguments-1)\n\t\t* [imageWithTransparentBorder(blob, options)](#imagewithtransparentborderblob-options)\n\t\t\t* [Arguments](#arguments-2)\n\t\t* [imageWithRoundedCorner(blob, options)](#imagewithroundedcornerblob-options)\n\t\t\t* [Arguments](#arguments-3)\n\t\t* [imageAsThumbnail(blob, options)](#imageasthumbnailblob-options)\n\t\t\t* [Arguments](#arguments-4)\n\t\t* [imageAsResized(blob, options)](#imageasresizedblob-options)\n\t\t\t* [Arguments](#arguments-5)\n\t\t* [imageAsCropped(blob, options)](#imageascroppedblob-options)\n\t\t\t* [Arguments](#arguments-6)\n\t\t* [imageTransform(blob, options)](#imagetransformblob-options)\n\t\t\t* [Arguments](#arguments-7)\n\t\t* [compress(blob, quality)](#compressblob-quality)\n\t\t\t* [Arguments](#arguments-8)\n* [✨Features](#features)\n* [📚Learn More](#learn-more)\n* [📣 Feedback](#-feedback)\n* [©️ Legal](#️-legal)\n\n\n## 📝 Description\n\nTi.ImageFactory provides a set of image transformation functions including the ability to scale, crop, and compress images. Additionally, this module offers the functionality of adding alpha channels and transparent borders.  This is a repackaging of the compiled iOS and Android modules for [Ti.ImageFactory](https://github.com/appcelerator-modules/ti.imagefactory) to allow for installation via npm.\n\n## 🚀 Getting Started\n\n1. Install `@titanium/imagefactory` in root of project\n\n```\nnpm install @titanium/imagefactory\n```\n\n## Accessing the @titanium/imagefactory Module\n\nTo access this module from JavaScript, you would do the following:\n\n```js\nconst imageFactory = require('@titanium/imagefactory');\n```\n\n### Methods\n\n#### imageWithRotation(blob, options)\n\nCreates a new image by creating a copy of the given image that is rotated.\n\n##### Arguments\n\n* Image blob[blob]: Image to transform\n* Options[dictionary]: A dictionary specifying the options for the transformation\n    * degrees[int]: The degrees to rotate the image\n\n#### imageWithAlpha(blob, options)\n\nCreates a new image by creating a copy of the given image, adding an alpha channel if it doesn't already have one.\n\n##### Arguments\n\n* Image blob[blob]: Image to transform\n* Options[dictionary]: A dictionary specifying the options for the transformation\n    * iOS: Currently there are no properties for this method -- specify an empty dictionary\n    * Android: format [int]: The output format of the image: either ImageFactory.PNG or ImageFactory.JPEG (default: ImageFactory.JPEG)\n    * Android: quality[float]: The quality of the resulting JPEG image, expressed as a value from 0.0 to 1.0. The value 0.0 represents the maximum compression (or lowest quality) while the value 1.0 represents the least compression (or best quality). (default: 0.7)\n\n#### imageWithTransparentBorder(blob, options)\n\nCreates a new image by creating a copy of the given image, adding a transparent border of the given size around its edges. The size of the image will be expanded by the specified border size.\n\n##### Arguments\n\n* Image blob[blob]: Image to transform\n* Options[dictionary]: A dictionary specifying the options for the transformation\n    * borderSize[int]: The size of the border (default: 1)\n    * Android: format [int]: The output format of the image: either ImageFactory.PNG or ImageFactory.JPEG (default: ImageFactory.JPEG)\n    * Android: quality[float]: The quality of the resulting JPEG image, expressed as a value from 0.0 to 1.0. The value 0.0 represents the maximum compression (or lowest quality) while the value 1.0 represents the least compression (or best quality). (default: 0.7)\n\n#### imageWithRoundedCorner(blob, options)\n\nCreates a new image by creating a copy of the given image with rounded corners.\n\n##### Arguments\n\n* Image blob[blob]: Image to transform\n* Options[dictionary]: A dictionary specifying the options for the transformation\n   * borderSize[int]: The size of the border (default: 1)\n   * cornerRadius[int]: The radius of the corner edges (default: 0)\n   * Android: format [int]: The output format of the image: either ImageFactory.PNG or ImageFactory.JPEG (default: ImageFactory.JPEG).\n   * Android: quality[float]: The quality of the resulting JPEG image, expressed as a value from 0.0 to 1.0. The value 0.0 represents the maximum compression (or lowest quality) while the value 1.0 represents the least compression (or best quality). (default: 0.7).\n\n#### imageAsThumbnail(blob, options)\n\nCreates a new image by creating a copy of the given image that is squared to the thumbnail size.\n\n##### Arguments\n\n* Image blob[blob]: Image to transform\n* Options[dictionary]: A dictionary specifying the options for the transformation\n    * size[int]: The size of the thumbnail (default: 48)\n    * borderSize[int]: The size of the border (default: 1)\n    * cornerRadius[int]: The radius of the corner edges (default:0)\n    * iOS: quality[int]: The interpolation quality. One of the following constants (default: imagefactory.QUALITY\\_HIGH)\n        * imagefactory.QUALITY\\_DEFAULT\n        * imagefactory.QUALITY\\_NONE\n        * imagefactory.QUALITY\\_LOW\n        * imagefactory.QUALITY\\_MEDIUM\n        * imagefactory.QUALITY\\_HIGH\n    * Android: quality[float]: The quality of the resulting JPEG image, expressed as a value from 0.0 to 1.0. The value 0.0 represents the maximum compression (or lowest quality) while the value 1.0 represents the least compression (or best quality). (default: 0.7)\n    * Android: dither[boolean]: Indicates if dithering should be applied while scaling. May provide better quality (default: true)\n    * Android: format [int]: The output format of the image: either ImageFactory.PNG or ImageFactory.JPEG (default: ImageFactory.JPEG)\n\n#### imageAsResized(blob, options)\n\nCreates a new image by creating a copy of the given image that is rescaled to the specified size.\n\n##### Arguments\n\n* Image blob[blob]: Image to transform\n* Options[dictionary]: A dictionary specifying the options for the transformation\n    * width[int]: The width of the new image (default: image width)\n    * height[int]: The height of the new image (default: image height)\n    * iOS: hires[boolean]: Create a hires image (for Retina displays only)\n    * iOS: quality[int]: The interpolation quality. One of the following constants (default: imagefactory.QUALITY\\_HIGH)\n        * imagefactory.QUALITY\\_DEFAULT\n        * imagefactory.QUALITY\\_NONE\n        * imagefactory.QUALITY\\_LOW\n        * imagefactory.QUALITY\\_MEDIUM\n        * imagefactory.QUALITY\\_HIGH\n    * Android. format [int]: The output format of the image: either ImageFactory.PNG or ImageFactory.JPEG (default: ImageFactory.JPEG)\n    * quality[float]: The quality of the resulting JPEG image, expressed as a value from 0.0 to 1.0. The value 0.0 represents the maximum compression (or lowest quality) while the value 1.0 represents the least compression (or best quality). (default: 0.7)\n\n#### imageAsCropped(blob, options)\n\nCreates a new image by creating a copy of the given image that is cropped to the specified bounds.\n\n##### Arguments\n\n* Image blob[blob]: Image to transform\n* Options[dictionary]: A dictionary specifying the options for the transformation\n    * width[int]: The width of the new image (default: image width)\n    * height[int]: The height of the new image (default: image height)\n    * x[int]: The x-coordinate of the upper-left corner of the bounds (default: image center - width / 2)\n    * y[int]: The y-coordinate of the upper-left corner of the bounds (default: image center - height / 2)\n    * Android: format [int]: The output format of the image: either ImageFactory.PNG or ImageFactory.JPEG (default: ImageFactory.JPEG)\n    * Android: quality[float]: The quality of the resulting JPEG image, expressed as a value from 0.0 to 1.0. The value 0.0 represents the maximum compression (or lowest quality) while the value 1.0 represents the least compression (or best quality). (default: 0.7)\n\n#### imageTransform(blob, options)\n\nCreates a new image by applying a sequence of transformations to the image.\n\n##### Arguments\n\n* Image blob[blob]: Image to transform\n* Transform[dictionary]: A sequence of transform specifications. Transforms are listed as additional parameters to the function and are applied in the order specified. Each transform is a dictionary with the options described above for each transform along with an additional 'type' property included with each dictionary of transform options.\n    * type[int]: The identifier of the transform to apply. One of the following constants\n        * imagefactory.TRANSFORM\\_CROP\n        * imagefactory.TRANSFORM\\_RESIZE\n        * imagefactory.TRANSFORM\\_THUMBNAIL\n        * imagefactory.TRANSFORM\\_ROUNDEDCORNER\n        * imagefactory.TRANSFORM\\_TRANSPARENTBORDER\n        * imagefactory.TRANSFORM\\_ALPHA\n    * options as described in the above transforms\n\n#### compress(blob, quality)\n\nCreates a new image by creating a copy of the given image and applying the specified compression quality.\n\n##### Arguments\n\n* Image blob[blob]: Image to compress\n* Compression Quality[float]; The quality of the resulting JPEG image, expressed as a value from 0.0 to 1.0. The value 0.0 represents the maximum compression (or lowest quality) while the value 1.0 represents the least compression (or best quality). (default: 1.0)\n\n\n\n\n## ✨Features\n\niOS: `ti.imagefactory 1.3.0`\nAndroid: `ti.imagefactory 4.0.0`\n\n* [x] Scale images\n* [x] Crop images\n* [x] Compress images\n* [x] Add alpha channel to images\n* [x] Add transparent borders to images\n\n\n## 📚Learn More\n\n- [Ti.ImageFactory GitHub Repo](https://github.com/appcelerator-modules/ti.imagefactory)\n\n## 📣 Feedback\n\nHave an idea or a comment?  [Join in the conversation here](https://github.com/brentonhouse/titanium-imagefactory/issues)! \n\n## ©️ Legal\n\nModules are licensed under Apache 2.0 from https://github.com/appcelerator-modules/ti.imagefactory\n\nAlloy is developed by Appcelerator and the community and is Copyright © 2012-Present by Appcelerator, Inc. All Rights Reserved.\n\nAlloy is made available under the Apache Public License, version 2. See their license file for more information.\n\nAppcelerator is a registered trademark of Appcelerator, Inc. Titanium is a registered trademark of Appcelerator, Inc. Please see the LEGAL information about using trademarks, privacy policy, terms of usage and other legal information at http://www.appcelerator.com/legal.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobilehero-archive%2Ftitanium-imagefactory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmobilehero-archive%2Ftitanium-imagefactory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobilehero-archive%2Ftitanium-imagefactory/lists"}