Implementing Syncfusion Angular Image Editor
The Syncfusion Angular Image Editor component provides a comprehensive, feature-rich solution for image editing and annotation. It allows developers to integrate professional image editing capabilities directly into Angular applications, supporting a wide range of editing operations including annotations, transformations, filtering, and more.
Component Overview
The Image Editor is a powerful, standalone component that provides:
- Complete image editing suite with 20+ built-in tools
- Flexible annotation system supporting text, shapes, and freehand drawing
- Advanced transformations including rotate, flip, straighten, zoom, and pan
- Professional image filters (cold, warm, chrome, sepia, invert, grayscale, etc.)
- Fine-tuning controls for brightness, contrast, saturation, hue, exposure, blur, and opacity
- Frame application with multiple frame types and customization options
- Redaction tools for privacy protection (blur and pixelate)
- Multiple input/output options including local files, base64, blob, file uploader, and file manager
- Rich undo/redo history (16 steps maximum)
- Fully customizable toolbars with contextual and quick-access options
- Z-order management for annotation layering
- Mobile-friendly with touch gestures (pinch zoom)
- Full accessibility support including WCAG 2.2, keyboard navigation, and screen reader compatibility
- Multi-language support with 150+ localization keywords
Documentation and Navigation Guide
Getting Started & Installation
📄 Read: references/getting-started.md
- Installation and package setup
- Dependencies and module imports
- Basic component implementation
- CSS imports and theme configuration
- First render and initialization
Annotations & Drawing
📄 Read: references/annotations.md
- Text annotations with formatting (bold, italic, underline, strikethrough)
- Multiline text support
- Font family and text color customization
- Freehand drawing with stroke adjustment
- Shape annotations (rectangles, ellipses, lines, arrows, paths)
- Image annotations and watermarking
- Deleting and managing annotations
- Shape styling and default customization
Selection & Cropping
📄 Read: references/selection-and-cropping.md
- Custom selection shapes
- Square and circle selections
- Aspect ratio selections (2:3, 3:2, 4:3, 16:9, etc.)
- Cropping selected regions
- Selection event handling
- Locking selection areas
- Custom ratio selection during cropping
Image Transformations
📄 Read: references/transform.md
- Rotating images (clockwise/counterclockwise)
- Flipping horizontally and vertically
- Straightening images with fine adjustments
- Zooming in/out with min/max zoom levels
- Panning functionality and events
- Transform event handlers
- Keyboard shortcuts for transformations
Filtering & Fine-tuning
📄 Read: references/filter-and-finetune.md
- Applying image filters (Cold, Warm, Chrome, Sepia, Invert, Grayscale, Black & White)
- Fine-tuning brightness and contrast
- Adjusting saturation levels
- Hue adjustments
- Exposure control
- Blur effects
- Opacity adjustments
- Filter and finetune event handling
Frame Application
📄 Read: references/frames.md
- Frame types (Mat, Bevel, Line, Hook, Inset)
- Frame color customization
- Gradient color support
- Frame size and offset configuration
- Border radius for line-type frames
- Frame line styles (solid, dashed, dotted)
- Frame changing events
Redaction & Privacy
📄 Read: references/redaction.md
- Drawing redactions (blur and pixelate types)
- Customizing redaction properties
- Selecting specific redactions
- Updating redaction settings
- Deleting redactions
- Retrieving redaction details
Open & Save Operations
📄 Read: references/open-and-save.md
- Opening images from multiple sources (local, base64, blob, uploader, file manager, treeview)
- Saving with format selection (PNG, JPEG, SVG, WEBP, BMP)
- Image quality control for JPEG format
- Exporting as different formats
- Converting to base64, byte arrays, and blob
- Watermark application during open/save
- Custom save dialogs and server uploads
- Image settings for custom dimensions
Undo & Redo Operations
📄 Read: references/undo-redo.md
- Implementing undo functionality
- Implementing redo functionality
- Understanding history limitations (16 steps)
- Keyboard shortcuts (Ctrl+Z, Ctrl+Y)
Toolbar Customization
📄 Read: references/toolbar.md
- Built-in toolbar items and their functions
- Adding custom toolbar items
- Showing/hiding toolbar
- Enabling/disabling specific items
- Contextual toolbar customization
- Toolbar templates for complete customization
- Toolbar events (toolbarCreated, toolbarItemClicked, toolbarUpdating)
Quick Access Toolbar
📄 Read: references/quick-access-toolbar.md
- Quick access toolbar visibility control
- Adding custom items to quick access toolbar
- Customizing annotation-specific actions
- Event handling for toolbar operations
Z-Order & Layering
📄 Read: references/z-order.md
- Bringing annotations forward
- Sending annotations backward
- Bringing annotations to front
- Sending annotations to back
- Managing multiple annotation layers
Accessibility & Compliance
📄 Read: references/accessibility.md
- WCAG 2.2 compliance standards
- Keyboard shortcuts and navigation
- Screen reader support
- Color contrast standards
- Mobile accessibility support
- RTL (Right-to-Left) support
API Reference
📄 Read: references/api.md
- Complete properties reference with types and defaults
- All methods with parameters and return types
- All events with descriptions
- Event arguments reference
- Filter, finetune, shape, and frame types
- Selection shapes and export formats
- Usage examples for properties and events
Localization
📄 Read: references/localization.md
- Setting locale configuration
- Customizing UI text in multiple languages
- Translation keywords and values
- Supporting international audiences
Image Restrictions & Validation
📄 Read: references/image-restrictions.md
- Specifying allowed file extensions
- Setting minimum file size limits
- Setting maximum file size limits
- Validation error messages
- Upload settings configuration
Image Resizing
📄 Read: references/resize.md
- Resizing image dimensions
- Aspect ratio preservation
- Resize event handling
- Custom dimension specifications
End-User Capabilities
📄 Read: references/end-user-capabilities.md
- User-facing features and workflows
- Opening images through UI
- Zoom operations via toolbar, pinch, mouse wheel, keyboard
- Panning functionality
- Toolbar-based transformations
- Annotation creation and editing
- Filter and fine-tune application
- Save and export workflows
How-To Guides
📄 Read: references/clear-image.md - Clearing editor state for dialog reuse
📄 Read: references/fit-to-width-height.md - Dynamic zoom fitting
📄 Read: references/render-in-dialog.md - Modal dialog integration
📄 Read: references/reset-image.md - Reverting to original state
Quick Start Example
import { Component } from '@angular/core';
import { ImageEditorModule } from '@syncfusion/ej2-angular-image-editor';
@Component({
imports: [ImageEditorModule],
standalone: true,
selector: 'app-root',
template: `
<div style="width: 550px; height: 350px;">
<ejs-imageeditor
#imageEditor
[toolbar]="['Open', 'Undo', 'Redo', 'Crop', 'Annotate', 'Finetune', 'Filter', 'Resize', 'Save', 'Reset']"
></ejs-imageeditor>
</div>
<button (click)="openImage()">Open Image</button>
`
})
export class AppComponent {
@ViewChild('imageEditor') imageEditor: any;
openImage() {
this.imageEditor.open('path-to-image.png');
}
addAnnotation() {
this.imageEditor.drawText(50, 50, 'Sample Text', 'Arial', 12, false, false, '#000000');
}
rotateImage() {
this.imageEditor.rotate(90);
}
saveImage() {
this.imageEditor.export('edited-image', 'png');
}
}
Common Patterns
Pattern 1: Open Image & Add Annotations
// Open image from file
this.imageEditor.open('image.png');
// Add text annotation
this.imageEditor.drawText(100, 100, 'Important', 'Arial', 16, true, false, '#FF0000');
// Add rectangle
this.imageEditor.drawRectangle(50, 50, 200, 150, 2, '#0000FF', '#FFFFFF');
// Add freehand drawing
this.imageEditor.freehandDraw();
Pattern 2: Apply Filters & Fine-tuning
// Apply filter
this.imageEditor.applyImageFilter('Sepia');
// Fine-tune brightness
this.imageEditor.finetuneImage('Brightness', 50);
// Fine-tune contrast
this.imageEditor.finetuneImage('Contrast', -30);
// Fine-tune saturation
this.imageEditor.finetuneImage('Saturation', 40);
Pattern 3: Crop & Transform
// Select region for cropping
this.imageEditor.select('Custom', 50, 50, 300, 200);
// Crop the selected region
this.imageEditor.crop();
// Rotate after cropping
this.imageEditor.rotate(90);
// Flip horizontally
this.imageEditor.flip('Horizontal');
Pattern 4: Customized Toolbar
toolbar: [
'Open',
'Undo',
'Redo',
'Crop',
'RotateLeft',
'RotateRight',
'HorizontalFlip',
'VerticalFlip',
'Annotate',
'Finetune',
'Filter',
'Frame',
'Redact',
'Resize',
'Save',
'Reset'
];
Pattern 5: Save with Different Formats
// Save as PNG (default)
this.imageEditor.export('myImage', 'png');
// Save as JPEG with quality
this.imageEditor.export('myImage', 'jpeg', 90);
// Get base64 data
const base64Data = this.imageEditor.getImageData();
// Save as blob
this.imageEditor.getImageData().then(data => {
const blob = this.dataURLtoBlob(data);
// Send to server
});
Key Props & Configuration
| Property |
Type |
Description |
When to Use |
toolbar |
array |
List of toolbar items to display |
Customize visible tools |
toolbarTemplate |
template |
Custom template for entire toolbar |
Complete toolbar redesign |
uploadSettings |
object |
File validation rules (extensions, size) |
Restrict upload formats/sizes |
zoomSettings |
object |
Min/max zoom factor configuration |
Control zoom boundaries |
fontFamily |
array |
Additional font families for text |
Add custom fonts |
locale |
string |
Language for UI text |
Multi-language support |
height |
string/number |
Component height |
Layout sizing |
width |
string/number |
Component width |
Layout sizing |
showQuickAccessToolbar |
boolean |
Show quick access toolbar |
Control quick toolbar visibility |
Common Use Cases
- Photo Editing App - Full-featured image editor with all tools
- Document Annotation - Highlight, mark, and comment on documents
- Social Media Content - Apply filters, frames, and text to images
- Privacy Protection - Redact sensitive information before sharing
- Profile Picture Editor - Crop, rotate, and apply filters to avatars
- Real Estate Listings - Rotate, frame, and annotate property photos
- Feedback & Collaboration - Annotate screenshots for team communication
- Template Design - Layer annotations with z-order for custom layouts
- Form Image Capture - Crop, rotate, and optimize mobile camera captures
- Watermark Application - Add text and image watermarks for branding
Reference Files
All detailed documentation is organized by feature in the references/ folder. Each reference file is self-contained and covers specific functionality in depth.
See individual reference files for code examples, event handling, and advanced configurations.
1---2name: syncfusion-angular-image-editor3description: Implement feature-rich image editing in Angular applications using Syncfusion Image Editor. Use this skill whenever user mentions editing images, adding annotations, applying filters, cropping, transforming, or manipulating images in Angular. Covers installation, all annotation types (text, shapes, freehand), transformations (rotate, flip, zoom), filtering, frame application, redaction, open/save functionality, undo/redo, toolbar customization, accessibility, and advanced features like z-ordering and dialog integration.4---56# Implementing Syncfusion Angular Image Editor78The Syncfusion Angular Image Editor component provides a comprehensive, feature-rich solution for image editing and annotation. It allows developers to integrate professional image editing capabilities directly into Angular applications, supporting a wide range of editing operations including annotations, transformations, filtering, and more.910## Component Overview1112The Image Editor is a powerful, standalone component that provides:1314- **Complete image editing suite** with 20+ built-in tools15- **Flexible annotation system** supporting text, shapes, and freehand drawing16- **Advanced transformations** including rotate, flip, straighten, zoom, and pan17- **Professional image filters** (cold, warm, chrome, sepia, invert, grayscale, etc.)18- **Fine-tuning controls** for brightness, contrast, saturation, hue, exposure, blur, and opacity19- **Frame application** with multiple frame types and customization options20- **Redaction tools** for privacy protection (blur and pixelate)21- **Multiple input/output options** including local files, base64, blob, file uploader, and file manager22- **Rich undo/redo history** (16 steps maximum)23- **Fully customizable toolbars** with contextual and quick-access options24- **Z-order management** for annotation layering25- **Mobile-friendly** with touch gestures (pinch zoom)26- **Full accessibility support** including WCAG 2.2, keyboard navigation, and screen reader compatibility27- **Multi-language support** with 150+ localization keywords2829## Documentation and Navigation Guide3031### Getting Started & Installation32📄 **Read:** [references/getting-started.md](references/getting-started.md)33- Installation and package setup34- Dependencies and module imports35- Basic component implementation36- CSS imports and theme configuration37- First render and initialization3839### Annotations & Drawing40📄 **Read:** [references/annotations.md](references/annotations.md)41- Text annotations with formatting (bold, italic, underline, strikethrough)42- Multiline text support43- Font family and text color customization44- Freehand drawing with stroke adjustment45- Shape annotations (rectangles, ellipses, lines, arrows, paths)46- Image annotations and watermarking47- Deleting and managing annotations48- Shape styling and default customization4950### Selection & Cropping51📄 **Read:** [references/selection-and-cropping.md](references/selection-and-cropping.md)52- Custom selection shapes53- Square and circle selections54- Aspect ratio selections (2:3, 3:2, 4:3, 16:9, etc.)55- Cropping selected regions56- Selection event handling57- Locking selection areas58- Custom ratio selection during cropping5960### Image Transformations61📄 **Read:** [references/transform.md](references/transform.md)62- Rotating images (clockwise/counterclockwise)63- Flipping horizontally and vertically64- Straightening images with fine adjustments65- Zooming in/out with min/max zoom levels66- Panning functionality and events67- Transform event handlers68- Keyboard shortcuts for transformations6970### Filtering & Fine-tuning71📄 **Read:** [references/filter-and-finetune.md](references/filter-and-finetune.md)72- Applying image filters (Cold, Warm, Chrome, Sepia, Invert, Grayscale, Black & White)73- Fine-tuning brightness and contrast74- Adjusting saturation levels75- Hue adjustments76- Exposure control77- Blur effects78- Opacity adjustments79- Filter and finetune event handling8081### Frame Application82📄 **Read:** [references/frames.md](references/frames.md)83- Frame types (Mat, Bevel, Line, Hook, Inset)84- Frame color customization85- Gradient color support86- Frame size and offset configuration87- Border radius for line-type frames88- Frame line styles (solid, dashed, dotted)89- Frame changing events9091### Redaction & Privacy92📄 **Read:** [references/redaction.md](references/redaction.md)93- Drawing redactions (blur and pixelate types)94- Customizing redaction properties95- Selecting specific redactions96- Updating redaction settings97- Deleting redactions98- Retrieving redaction details99100### Open & Save Operations101📄 **Read:** [references/open-and-save.md](references/open-and-save.md)102- Opening images from multiple sources (local, base64, blob, uploader, file manager, treeview)103- Saving with format selection (PNG, JPEG, SVG, WEBP, BMP)104- Image quality control for JPEG format105- Exporting as different formats106- Converting to base64, byte arrays, and blob107- Watermark application during open/save108- Custom save dialogs and server uploads109- Image settings for custom dimensions110111### Undo & Redo Operations112📄 **Read:** [references/undo-redo.md](references/undo-redo.md)113- Implementing undo functionality114- Implementing redo functionality115- Understanding history limitations (16 steps)116- Keyboard shortcuts (Ctrl+Z, Ctrl+Y)117118### Toolbar Customization119📄 **Read:** [references/toolbar.md](references/toolbar.md)120- Built-in toolbar items and their functions121- Adding custom toolbar items122- Showing/hiding toolbar123- Enabling/disabling specific items124- Contextual toolbar customization125- Toolbar templates for complete customization126- Toolbar events (toolbarCreated, toolbarItemClicked, toolbarUpdating)127128### Quick Access Toolbar129📄 **Read:** [references/quick-access-toolbar.md](references/quick-access-toolbar.md)130- Quick access toolbar visibility control131- Adding custom items to quick access toolbar132- Customizing annotation-specific actions133- Event handling for toolbar operations134135### Z-Order & Layering136📄 **Read:** [references/z-order.md](references/z-order.md)137- Bringing annotations forward138- Sending annotations backward139- Bringing annotations to front140- Sending annotations to back141- Managing multiple annotation layers142143### Accessibility & Compliance144📄 **Read:** [references/accessibility.md](references/accessibility.md)145- WCAG 2.2 compliance standards146- Keyboard shortcuts and navigation147- Screen reader support148- Color contrast standards149- Mobile accessibility support150- RTL (Right-to-Left) support151152### API Reference153📄 **Read:** [references/api.md](references/api.md)154- Complete properties reference with types and defaults155- All methods with parameters and return types156- All events with descriptions157- Event arguments reference158- Filter, finetune, shape, and frame types159- Selection shapes and export formats160- Usage examples for properties and events161162### Localization163📄 **Read:** [references/localization.md](references/localization.md)164- Setting locale configuration165- Customizing UI text in multiple languages166- Translation keywords and values167- Supporting international audiences168169### Image Restrictions & Validation170📄 **Read:** [references/image-restrictions.md](references/image-restrictions.md)171- Specifying allowed file extensions172- Setting minimum file size limits173- Setting maximum file size limits174- Validation error messages175- Upload settings configuration176177### Image Resizing178📄 **Read:** [references/resize.md](references/resize.md)179- Resizing image dimensions180- Aspect ratio preservation181- Resize event handling182- Custom dimension specifications183184### End-User Capabilities185📄 **Read:** [references/end-user-capabilities.md](references/end-user-capabilities.md)186- User-facing features and workflows187- Opening images through UI188- Zoom operations via toolbar, pinch, mouse wheel, keyboard189- Panning functionality190- Toolbar-based transformations191- Annotation creation and editing192- Filter and fine-tune application193- Save and export workflows194195### How-To Guides196197📄 **Read:** [references/clear-image.md](references/clear-image.md) - Clearing editor state for dialog reuse198199📄 **Read:** [references/fit-to-width-height.md](references/fit-to-width-height.md) - Dynamic zoom fitting200201📄 **Read:** [references/render-in-dialog.md](references/render-in-dialog.md) - Modal dialog integration202203📄 **Read:** [references/reset-image.md](references/reset-image.md) - Reverting to original state204205## Quick Start Example206207```typescript208import { Component } from '@angular/core';209import { ImageEditorModule } from '@syncfusion/ej2-angular-image-editor';210211@Component({212 imports: [ImageEditorModule],213 standalone: true,214 selector: 'app-root',215 template: `216 <div style="width: 550px; height: 350px;">217 <ejs-imageeditor 218 #imageEditor219 [toolbar]="['Open', 'Undo', 'Redo', 'Crop', 'Annotate', 'Finetune', 'Filter', 'Resize', 'Save', 'Reset']"220 ></ejs-imageeditor>221 </div>222 <button (click)="openImage()">Open Image</button>223 `224})225export class AppComponent {226 @ViewChild('imageEditor') imageEditor: any;227228 openImage() {229 this.imageEditor.open('path-to-image.png');230 }231232 addAnnotation() {233 this.imageEditor.drawText(50, 50, 'Sample Text', 'Arial', 12, false, false, '#000000');234 }235236 rotateImage() {237 this.imageEditor.rotate(90);238 }239240 saveImage() {241 this.imageEditor.export('edited-image', 'png');242 }243}244```245246## Common Patterns247248### Pattern 1: Open Image & Add Annotations249```typescript250// Open image from file251this.imageEditor.open('image.png');252253// Add text annotation254this.imageEditor.drawText(100, 100, 'Important', 'Arial', 16, true, false, '#FF0000');255256// Add rectangle257this.imageEditor.drawRectangle(50, 50, 200, 150, 2, '#0000FF', '#FFFFFF');258259// Add freehand drawing260this.imageEditor.freehandDraw();261```262263### Pattern 2: Apply Filters & Fine-tuning264```typescript265// Apply filter266this.imageEditor.applyImageFilter('Sepia');267268// Fine-tune brightness269this.imageEditor.finetuneImage('Brightness', 50);270271// Fine-tune contrast272this.imageEditor.finetuneImage('Contrast', -30);273274// Fine-tune saturation275this.imageEditor.finetuneImage('Saturation', 40);276```277278### Pattern 3: Crop & Transform279```typescript280// Select region for cropping281this.imageEditor.select('Custom', 50, 50, 300, 200);282283// Crop the selected region284this.imageEditor.crop();285286// Rotate after cropping287this.imageEditor.rotate(90);288289// Flip horizontally290this.imageEditor.flip('Horizontal');291```292293### Pattern 4: Customized Toolbar294```typescript295toolbar: [296 'Open',297 'Undo',298 'Redo',299 'Crop',300 'RotateLeft',301 'RotateRight',302 'HorizontalFlip',303 'VerticalFlip',304 'Annotate',305 'Finetune',306 'Filter',307 'Frame',308 'Redact',309 'Resize',310 'Save',311 'Reset'312];313```314315### Pattern 5: Save with Different Formats316```typescript317// Save as PNG (default)318this.imageEditor.export('myImage', 'png');319320// Save as JPEG with quality321this.imageEditor.export('myImage', 'jpeg', 90);322323// Get base64 data324const base64Data = this.imageEditor.getImageData();325326// Save as blob327this.imageEditor.getImageData().then(data => {328 const blob = this.dataURLtoBlob(data);329 // Send to server330});331```332333## Key Props & Configuration334335| Property | Type | Description | When to Use |336|----------|------|-------------|------------|337| `toolbar` | array | List of toolbar items to display | Customize visible tools |338| `toolbarTemplate` | template | Custom template for entire toolbar | Complete toolbar redesign |339| `uploadSettings` | object | File validation rules (extensions, size) | Restrict upload formats/sizes |340| `zoomSettings` | object | Min/max zoom factor configuration | Control zoom boundaries |341| `fontFamily` | array | Additional font families for text | Add custom fonts |342| `locale` | string | Language for UI text | Multi-language support |343| `height` | string/number | Component height | Layout sizing |344| `width` | string/number | Component width | Layout sizing |345| `showQuickAccessToolbar` | boolean | Show quick access toolbar | Control quick toolbar visibility |346347## Common Use Cases3483491. **Photo Editing App** - Full-featured image editor with all tools3502. **Document Annotation** - Highlight, mark, and comment on documents3513. **Social Media Content** - Apply filters, frames, and text to images3524. **Privacy Protection** - Redact sensitive information before sharing3535. **Profile Picture Editor** - Crop, rotate, and apply filters to avatars3546. **Real Estate Listings** - Rotate, frame, and annotate property photos3557. **Feedback & Collaboration** - Annotate screenshots for team communication3568. **Template Design** - Layer annotations with z-order for custom layouts3579. **Form Image Capture** - Crop, rotate, and optimize mobile camera captures35810. **Watermark Application** - Add text and image watermarks for branding359360## Reference Files361362All detailed documentation is organized by feature in the `references/` folder. Each reference file is self-contained and covers specific functionality in depth.363364See individual reference files for code examples, event handling, and advanced configurations.