/**
 * rawFileSupport — RAW camera file support for PhotoEditor
 *
 * Provides loading and processing of RAW camera formats including:
 * - Canon (.CR2, .CR3, .CRW)
 * - Nikon (.NEF, .NRW)
 * - Sony (.ARW, .SRF, .SR2)
 * - Adobe (.DNG)
 * - Fujifilm (.RAF)
 * - Olympus (.ORF)
 * - Panasonic (.RW2)
 * - Pentax (.PEF, .DNG)
 * - And many more via embedded thumbnail or DCRaw emulation
 *
 * Features:
 * - Embedded preview extraction (fast)
 * - Full demosaic processing (with optional libraw.js)
 * - White balance adjustment
 * - Exposure compensation
 * - Highlight recovery
 * - Noise reduction
 */
export type RawFormat = 'cr2' | 'cr3' | 'crw' | 'nef' | 'nrw' | 'arw' | 'srf' | 'sr2' | 'dng' | 'raf' | 'orf' | 'rw2' | 'pef' | 'raw' | '3fr' | 'fff' | 'iiq' | 'mrw' | 'x3f' | 'rwl' | 'srw' | 'unknown';
export interface RawMetadata {
    /** Camera maker */
    make: string;
    /** Camera model */
    model: string;
    /** Image width */
    width: number;
    /** Image height */
    height: number;
    /** ISO sensitivity */
    iso: number;
    /** Shutter speed (seconds) */
    shutterSpeed: number;
    /** Aperture (f-number) */
    aperture: number;
    /** Focal length (mm) */
    focalLength: number;
    /** Capture date */
    dateTime: Date | null;
    /** Orientation (EXIF) */
    orientation: number;
    /** Color temperature (K) */
    colorTemperature: number;
    /** Detected RAW format */
    format: RawFormat;
    /** Has embedded preview */
    hasPreview: boolean;
    /** Has embedded thumbnail */
    hasThumbnail: boolean;
}
export interface RawProcessingOptions {
    /** Use embedded preview instead of demosaic */
    usePreview: boolean;
    /** White balance mode */
    whiteBalance: 'camera' | 'auto' | 'daylight' | 'cloudy' | 'shade' | 'tungsten' | 'fluorescent' | 'flash' | 'custom';
    /** Custom color temperature (K) */
    colorTemperature: number;
    /** Custom tint (green-magenta) */
    tint: number;
    /** Exposure compensation (EV) */
    exposure: number;
    /** Highlight recovery (0-1) */
    highlightRecovery: number;
    /** Shadow recovery (0-1) */
    shadowRecovery: number;
    /** Noise reduction level (0-1) */
    noiseReduction: number;
    /** Chromatic aberration correction */
    chromaticAberration: boolean;
    /** Output color space */
    colorSpace: 'sRGB' | 'AdobeRGB' | 'ProPhotoRGB';
    /** Output bit depth */
    bitDepth: 8 | 16;
    /** Demosaic algorithm */
    demosaicAlgorithm: 'bilinear' | 'VNG' | 'PPG' | 'AHD' | 'DCB';
}
export interface RawLoadResult {
    /** Processed image data */
    imageData: ImageData;
    /** Raw file metadata */
    metadata: RawMetadata;
    /** Processing info */
    processingInfo: {
        method: 'preview' | 'thumbnail' | 'demosaic';
        timeMs: number;
        originalWidth: number;
        originalHeight: number;
    };
}
export declare const DEFAULT_RAW_OPTIONS: RawProcessingOptions;
export declare const RAW_EXTENSIONS: Record<RawFormat, string[]>;
export declare const ALL_RAW_EXTENSIONS: string[];
/**
 * Detect RAW format from file extension
 */
export declare function detectFormatFromExtension(filename: string): RawFormat;
/**
 * Detect RAW format from file header
 */
export declare function detectFormatFromHeader(buffer: ArrayBuffer): RawFormat;
/**
 * Check if file is a RAW format
 */
export declare function isRawFile(filename: string): boolean;
/**
 * Extract metadata from RAW file
 */
export declare function extractMetadata(buffer: ArrayBuffer): RawMetadata;
/**
 * Extract embedded JPEG preview from RAW file
 */
export declare function extractPreview(buffer: ArrayBuffer): Promise<ImageData | null>;
/**
 * Load and process RAW file
 */
export declare function loadRawFile(buffer: ArrayBuffer, options?: Partial<RawProcessingOptions>): Promise<RawLoadResult>;
/**
 * Quick preview load (just extract embedded preview)
 */
export declare function loadRawPreview(buffer: ArrayBuffer): Promise<ImageData | null>;
export default loadRawFile;
