4.0.0 • Published 4 years ago

nativescript-image-filters v4.0.0

Weekly downloads
32
License
MIT
Repository
github
Last release
4 years ago

Build CI npm GitHub stars

NativeScript-Image-Filters

Nativescript plugin for native image filters.

Sample

Demo

Installation

From your command prompt/termial go to your app's root folder and execute:

NativeScript Version 7+: tns plugin add nativescript-image-filters

NativeScript Verion prior to 7: tns plugin add nativescript-image-filters@3.0.0

Usage

JS:

import { Frame } from '@nativescript/core/ui/frame';
import { ImageFilters } from 'nativescript-image-filters';

const filters = new ImageFilters();

public effectOne() {
  const pic = Frame.topmost().currentPage.getViewById('myPicture');

      filters.invert(pic).then((result) => {

      // set the pic imageSource equal to the new imageSource
      pic.imageSource = result;

    }).catch((err) => {
      console.log('applyFilter ERROR: ' + err);
    });
}

IMPORTANT NOTE

Not all methods have been tested. The code needs to be cleaned up to reduce duplication in methods. The methods also need to be 1:1 for common methods. Right now not all iOS & Android methods are named correctly for the image filter. Pull requests are very welcome to improve the API for this plugin.

API

4.0.0

4 years ago

3.0.0

4 years ago

2.2.2

5 years ago

2.2.0

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

7 years ago

1.0.4

7 years ago

1.0.31

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago