TypeScript
ArtistAPhoto is written in TypeScript and includes full type definitions.
Importing Types
import {
ArtistAPhoto,
LicenseError,
ImageLoadError,
InvalidCropError,
InvalidDimensionsError,
FilterType,
ExportFormat,
CropOptions,
ResizeOptions,
TextOptions,
ShapeOptions,
LicenseInfo,
LicenseConfig
} from 'artistasdk';Type Definitions
type FilterType =
| 'grayscale' | 'sepia' | 'blur' | 'sharpen' | 'vintage'
| 'invert' | 'vignette' | 'posterize' | 'pixelate' | 'edgeDetection';
type ExportFormat = 'image/jpeg' | 'image/png' | 'image/webp';
interface CropOptions {
x: number;
y: number;
width: number;
height: number;
}
interface ResizeOptions {
quality?: 'low' | 'medium' | 'high';
maintainAspectRatio?: boolean;
}