An object containing editor configuration (see Configuration)
(file)
The emitted file after editing.
Configuration
Property
Description
ImageName
Name of the image.
ImageUrl
URL of the image (if it coming from a CDN) .
File
File object of the image (if it is being uploaded through the browser.
ImageType
Type of the image (default is image/jpeg).
AspectRatios
Array of aspect ratios. Available options: 0:0, 1:1 , 2:3 ,4:3, 16:9l . (default is 0:0)
Example
@Component({selector: 'app-root',styleUrls: ['./app.component.css']template: ` <ngx-image-editor [config]="config" (close)="close($event)" (file)="getEditedFile($event)"> </ngx-image-editor> `,})exportclassAppComponent{publicconfig={ImageName: 'Some image',AspectRatios: ["4:3","16:9"],ImageUrl: 'https://static.pexels.com/photos/248797/pexels-photo-248797.jpeg',ImageType: 'image/jpeg'}publicclose(){// Fired when the editor is closed.}publicgetEditedFile(file: File){// Fired when the file has been processed.}}
The Tidelift Subscription provides access to a continuously curated stream of human-researched and maintainer-verified data on open source packages and their licenses, releases, vulnerabilities, and development practices.