/** * Utility functions for handling images, including cross-origin image fetching */ import { type BatchProcessorConfig } from "./batchProcessor"; /** * Batch download tasks configuration */ export interface DownloadTask { /** URL to download */ url: string; /** Filename for the downloaded file */ filename: string; /** Optional index for tracking */ index?: number; } /** * Converts an image URL to a blob with cross-origin support * @param imageUrl - The image URL to fetch * @param options - Additional options for fetching * @returns Promise that resolves to a blob or null if failed */ export declare function fetchImageAsBlob(imageUrl: string, options?: { withTimestamp?: boolean; filename?: string; }): Promise<{ blob: Blob; filename: string; } | null>; /** * Converts an image URL to a File object with cross-origin support * @param imageUrl - The image URL to fetch * @param filename - The filename for the resulting File object. Defaults to 'image.jpg'. * @param mimeType - The MIME type for the File object. Defaults to 'image/jpeg'. * @returns Promise that resolves to a File object or null if failed */ export declare function fetchImageAsFile(imageUrl: string, filename?: string, mimeType?: string): Promise; /** * Download multiple images in batches * @param tasks - Array of download tasks * @param imageDownloader - Function to download a single image * @param options - Batch processing options * @returns Promise that resolves to array of download results */ export declare function batchDownloadImages(tasks: DownloadTask[], imageDownloader: (url: string, filename: string) => Promise, options?: Omit, "items" | "processor">): Promise>;