All Projects → bradmartin → nativescript-image-filters

bradmartin / nativescript-image-filters

Licence: other
NativeScript plugin to apply filters to images

Programming Languages

typescript
32286 projects
shell
77523 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to nativescript-image-filters

insomnia
😪 NativeScript plugin to keep the device awake (not dim the screen, lock, etc)
Stars: ✭ 40 (+33.33%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-store-update
No description or website provided.
Stars: ✭ 18 (-40%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-app-shortcuts
👇 Home Icon Actions for your NativeScript app, now also for Android!
Stars: ✭ 45 (+50%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-star-printer
🌟 Print directly to Star Micronics printers from your NativeScript app! http://www.starmicronics.com/
Stars: ✭ 28 (-6.67%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-vue-multi-drawer
A NativeScript-Vue component for creating multiple side drawers (4 sides supported)
Stars: ✭ 45 (+50%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-drawingpad
📝 NativeScript plugin to provide a way to capture any drawing (signatures are a common use case) from the device
Stars: ✭ 89 (+196.67%)
Mutual labels:  nativescript, nativescript-plugin
ui
Add right-to-left support to the NativeScript framework
Stars: ✭ 22 (-26.67%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-pushy
Easy push notifications for your NativeScript app!
Stars: ✭ 19 (-36.67%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-printer
📠 Send an image or the screen contents to a physical printer
Stars: ✭ 33 (+10%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-performance-monitor
⚡ Proof your app maintains 60-ish FPS by collecting data or showing it on screen with this NativeScript plugin!
Stars: ✭ 21 (-30%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-clipboard
📋 NativeScript plugin to copy stuff to the device clipboard, and read from it again
Stars: ✭ 40 (+33.33%)
Mutual labels:  nativescript, nativescript-plugin
Nativescript Vue
Native mobile applications using Vue and NativeScript.
Stars: ✭ 4,784 (+15846.67%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-vue-examples
🍈 NativeScript and Vue code samples.
Stars: ✭ 13 (-56.67%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-appversion
🔢 NativeScript plugin to retrieve your app's package ID and current version
Stars: ✭ 47 (+56.67%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-taptic-engine
📳 Use Apple's Taptic Engine to vibrate your iPhone 6s (and up) in a variety of ways
Stars: ✭ 16 (-46.67%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-fabric
Handling App URLs in nativescript apps
Stars: ✭ 29 (-3.33%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-apple-sign-in
Sign In With Apple, as seen on WWDC 2019, available with iOS 13
Stars: ✭ 37 (+23.33%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-app-icon-changer
Change the homescreen icon of your NativeScript iOS app at runtime!
Stars: ✭ 16 (-46.67%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-http
The best way to do HTTP requests in NativeScript, a drop-in replacement for the core HTTP with important improvements and additions like proper connection pooling, form data support and certificate pinning
Stars: ✭ 32 (+6.67%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-homekit
🏡 HomeKit plugin for your fancy NativeScript app
Stars: ✭ 23 (-23.33%)
Mutual labels:  nativescript, nativescript-plugin

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 [email protected]

Usage

TS

import { Frame, Image, ImageSource } from '@nativescript/core';
import { ImageFilters } from 'nativescript-image-filters';

const filters = new ImageFilters();

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

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

      // set the pic src equal to the new imageSource result from the filter method promise result
      pic.src = 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

  • highlightImage(img: Image, color: string, radius?: number): Promise<ImageSource>
  • invert(img: Image): Promise<ImageSource>
  • blackAndWhite(img: Image): Promise<ImageSource>
  • gamma(img: Image, red: number, green: number, blue: number): Promise<ImageSource>
  • colorFilter(img: Image, red: number, green: number, blue: number): Promise<ImageSource>
  • sepiaEffect(img: Image, depth: number, red: number, green: number, blue: number): Promise<ImageSource>
  • decreaseColorDepth(img: Image, bitOffset: number): Promise<ImageSource>
  • contrast(img: Image, value: number): Promise<ImageSource>
  • rotate(img: Image, degree: number): Promise<ImageSource>
  • brightness(img: Image, value: number): Promise<ImageSource>
  • gaussianBlur(img: Image): Promise<ImageSource>
  • createShadow(img: Image): Promise<ImageSource>
  • sharpen(img: Image, weight: number): Promise<ImageSource>
  • meanRemoval(img: Image): Promise<ImageSource>
  • smooth(img: Image, value: number): Promise<ImageSource>
  • emboss(img: Image): Promise<ImageSource>
  • engrave(img: Image): Promise<ImageSource>
  • boost(img: Image, type: number, percent: number): Promise<ImageSource>
  • roundCorner(img: Image, round: number): Promise<ImageSource>
  • waterMark(img: Image, watermark: string, location: android.graphic.Point, color: string, alpha: number, size: number, underline: boolean): Promise<ImageSource>
  • flip(img: Image, type: number): Promise<ImageSource>
  • tintImage(img: Image, degree: number): Promise<ImageSource>
  • fleaEffect(img: Image): Promise<ImageSource>
  • blackFilter(img: Image): Promise<ImageSource>
  • snowEffect(img: Image): Promise<ImageSource>
  • shadingFilter(img: Image, shadingColor: number): Promise<ImageSource>
  • saturationFilter(img: Image, level: number): Promise<ImageSource>
  • hueFilter(img: Image, level: number): Promise<ImageSource>
  • reflection(img: Image): Promise<ImageSource>
  • replaceColor(img: Image, fromColor: string, toColor: string): Promise<ImageSource>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].