import { URI } from "../../../../base/common/uri.js";
import { IFileService } from "../../../../platform/files/common/files.service.js";
import { ILogService } from "../../../../platform/log/common/log.service.js";
/**
 * Resizes an image provided as a UInt8Array string. Resizing is based on Open AI's algorithm for tokenzing images.
 * https://platform.openai.com/docs/guides/vision#calculating-costs
 * @param data - The UInt8Array string of the image to resize.
 * @returns A promise that resolves to the UInt8Array string of the resized image.
 */
export declare function resizeImage(data: Uint8Array | string, mimeType?: string): Promise<Uint8Array>;
/**
 * Memoized variant of {@link createImageThumbnail}. Repeated calls with the same
 * {@link cacheKey} (and matching size/byte length) reuse the previously generated
 * thumbnail instead of decoding and resizing the original image again.
 * @param cacheKey A stable identifier for the source image (e.g. the attachment id).
 * @param data The image bytes.
 * @param maxSize The maximum width or height of the thumbnail, in pixels.
 * @param targetWindow The window whose document is used to decode and resize the image.
 * @returns A promise that resolves to a {@link Blob} of the thumbnail, or `undefined` on failure.
 */
export declare function getOrCreateImageThumbnail(cacheKey: string, data: Uint8Array, maxSize: number, targetWindow: Window): Promise<Blob | undefined>;
export declare function convertStringToUInt8Array(data: string): Uint8Array;
export declare function convertUint8ArrayToString(data: Uint8Array): string;
export declare function createFileForMedia(fileService: IFileService, imagesFolder: URI, dataTransfer: Uint8Array, mimeType: string): Promise<URI | undefined>;
export declare function cleanupOldImages(fileService: IFileService, logService: ILogService, imagesFolder: URI): Promise<void>;
export declare function imageToHash(data: Uint8Array): Promise<string>;
