UNPKG

react-native-image-colors

Version:
28 lines 1.03 kB
import { cache } from './cache'; import { ImageColorsResult, Config } from './types'; /** * * @param uri - source of the image. Can be a remote URL, a base64 string or a local file path. * ```ts * const fromUrl = await getColors('https://example.com/image.jpg') * * const fromBase64 = await getColors('data:image/jpeg;base64,/9j/4Ri...') * * const fromLocalFile = await getColors(require('./images/cat.jpg')) * ``` * @param config - configuration */ declare const getColors: (uri: string, config?: Partial<Config>) => Promise<ImageColorsResult>; declare const ImageColors: { getColors: (uri: string, config?: Partial<Config>) => Promise<ImageColorsResult>; cache: { getItem: (key: string) => ImageColorsResult | undefined; setItem: (key: string, value: ImageColorsResult) => void; removeItem: (key: string) => boolean; clear: () => boolean; }; }; export default ImageColors; export { getColors, cache }; export type { ImageColorsResult }; //# sourceMappingURL=index.d.ts.map