Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@spoonconsulting/cordova-plugin-spectrum

Package Overview
Dependencies
Maintainers
5
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spoonconsulting/cordova-plugin-spectrum

Cordova plugin for Spectrum image compression library

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

cordova-plugin-spectrum

Build Status

Cordova plugin wrapper for Spectrum image compression library

Removal of Spectrum cordova-ios 7 will no longer support framework tag for pod installation and Spectrum sdk is no more maintained and will not provide support for its SDK to use framework. The compression logics have been replaced by native api for both platforms.

Supported Platforms

  • iOS
  • Android

Installation

To install the plugin:

cordova plugin add cordova-plugin-spectrum --save

To uninstall this plugin:

cordova plugin rm cordova-plugin-spectrum

Methods

compressImage(config, success, error)

Compresses the image and overwrites by the new one. You need to ensure that the file is in writable path. The following properties are available:

PropertyComment
sourcePathPath to the image
maxSizeResize the image to the specified size preserving aspect ratio (optional)

Sample usage

SpectrumManager.compressImage({
    sourcePath: path,
    maxSize: 300
}, function () {
    console.log('compressed image available at ', path);
}, function (err) {
    console.err('could not compress image ',err)
})

License

Cordova-plugin-spectrum is licensed under the Apache v2 License.

Credits

Cordova-plugin-spectrum is brought to you by Spoon Consulting.

Keywords

FAQs

Package last updated on 10 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc