Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

ngx-image-tool

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-image-tool

[![NPM](https://nodei.co/npm/ngx-image-tool.png?compact=true)](https://nodei.co/npm/ngx-image-tool/)

latest
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

NgxImageTool

NPM

Angular directive for retrieving meta data about an image from Azure Cognitive Services. Just use your key and Go!

Like binding to a regular click event in a template, you can do something like this:

<img src="http://some-image.jpg" [ngxImageTool] [config]="{subscriptionKey:"my-key"}" (dataLoaded)="onDataLoaded($event)" />

Installation

npm install --save ngx-image-tool

Usage

Add NgxImageToolModule to your list of module imports:

import { NgxImageToolModule } from 'ngx-image-tool';

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule, NgxImageToolModule],
  bootstrap: [AppComponent]
})
class AppModule {}

You can then use the directive in your templates:

@Component({
  selector: 'app',
  template: `
    <img src="http://some-image.jpg" [ngxImageTool] [config]="{subscriptionKey:"my-key"}" (dataLoaded)="onDataLoaded($event)" />
  `
})
export class AppComponent {
  onDataLoaded($event) {
    console.log(JSON.stringify($event));
  }
}

Options

Property nameTypeDefaultDescription
optionsany{subscriptionKey:"my-key"}Use your Azure Cognitive Services key here.

FAQs

Package last updated on 16 Dec 2020

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