{"id":18858320,"url":"https://github.com/buyungsp/cordova-plugin-vector-smooth","last_synced_at":"2026-05-09T16:07:03.375Z","repository":{"id":184227008,"uuid":"653683816","full_name":"buyungSP/cordova-plugin-vector-smooth","owner":"buyungSP","description":"The cordova-plugin-vector-smooth plugin is used to convert vector drawable files into base64 encoded images for use in Cordova applications. It supports XML vector drawable files, as well as PNG and BMP file formats.","archived":false,"fork":false,"pushed_at":"2024-05-11T23:19:38.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T01:19:23.297Z","etag":null,"topics":["android","cordova-plugin","drawable","image","xml"],"latest_commit_sha":null,"homepage":"","language":"Java","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/buyungSP.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,"governance":null}},"created_at":"2023-06-14T14:17:02.000Z","updated_at":"2024-05-11T23:19:42.000Z","dependencies_parsed_at":"2023-07-27T15:46:45.606Z","dependency_job_id":null,"html_url":"https://github.com/buyungSP/cordova-plugin-vector-smooth","commit_stats":null,"previous_names":["buyungsp/cordova-plugin-vector-smooth"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buyungSP%2Fcordova-plugin-vector-smooth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buyungSP%2Fcordova-plugin-vector-smooth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buyungSP%2Fcordova-plugin-vector-smooth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buyungSP%2Fcordova-plugin-vector-smooth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buyungSP","download_url":"https://codeload.github.com/buyungSP/cordova-plugin-vector-smooth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239800418,"owners_count":19699121,"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":["android","cordova-plugin","drawable","image","xml"],"created_at":"2024-11-08T04:11:55.562Z","updated_at":"2025-10-29T00:47:29.073Z","avatar_url":"https://github.com/buyungSP.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cordova-plugin-vector-smooth\n\nThe **cordova-plugin-vector-smooth** plugin is used to convert vector drawable files into base64 encoded images for use in Cordova applications.  \nIt supports **XML vector drawable files**, as well as **PNG and BMP file formats**.  \nIt also allows retrieving the **application icon (app logo)** without modifying its color or size.  \n\n---\n\n## Platform Support\n- Android  \n\n---\n\n## Installation\nYou can install this plugin through Cordova CLI by running the following command:\n\n```\ncordova plugin add cordova-plugin-vector-smooth\n```\n\n---\n\n## Usage\n\n### Function: `open`\n\n```js\ncordova.plugin.vector.smooth.open({\n  name: 'ic_vector',\n  color: '#FF0000'\n}).then(function(result) {\n  console.log(result.src);\n});\n```\n\n#### Parameters\n- **name** *(string)* → the name of the vector drawable file in the `res/drawable` folder.  \n- **color** *(string)* → the color tint that will be applied to the vector drawable.  \n\n#### Output\nThe output of this function is a base64 encoded image (PNG or BMP), depending on the type of icon.  \nYou can use the result in an `\u003cimg\u003e` tag or as a CSS background.  \n\n#### Example\n\n```js\ndocument.addEventListener('deviceready', onDeviceReady, false);\n\nasync function onDeviceReady() {\n  const imgContainer = document.createDocumentFragment();\n\n  const crop = await cordova.plugin.vector.smooth.open({\n    name: 'crop',\n    color: '#FF00FF'\n  });\n\n  const img = document.createElement('img');\n  img.src = crop.src;\n\n  imgContainer.appendChild(img);\n  document.body.appendChild(imgContainer);\n}\n```\n\n---\n\n### Function: `getAppLogo`\n\nThis function retrieves the **application logo (ic_launcher)** as base64 without any modification (original color and size).  \n\n```js\ncordova.plugin.vector.smooth.getAppLogo()\n  .then(function(result) {\n    console.log(result.src);\n    document.getElementById(\"logo\").src = result.src;\n  })\n  .catch(function(err) {\n    console.error(err);\n  });\n```\n\n#### Parameters\n- No parameters required.  \n\n#### Output\nReturns a base64 encoded PNG of the current app logo.  \n\n#### Example\n\n```js\ndocument.addEventListener('deviceready', async function() {\n  const logo = await cordova.plugin.vector.smooth.getAppLogo();\n\n  const img = document.createElement('img');\n  img.src = logo.src;\n  img.style.width = \"100px\"; // optional resize in HTML/CSS\n\n  document.body.appendChild(img);\n});\n```\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuyungsp%2Fcordova-plugin-vector-smooth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuyungsp%2Fcordova-plugin-vector-smooth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuyungsp%2Fcordova-plugin-vector-smooth/lists"}