|
|
@@ -1,6 +1,6 @@ |
|
|
|
import ColorThief from 'colorthief'; |
|
|
|
|
|
|
|
export const getImageMetadata = (imageUrl: string) => new Promise<Record<string, string | number>>((resolve, reject) => { |
|
|
|
export const getImageMetadata = (imageUrl: string) => new Promise<Record<string, string | number | [number, number, number][]>>((resolve, reject) => { |
|
|
|
const image = new Image(); |
|
|
|
image.addEventListener('load', async (imageLoadEvent) => { |
|
|
|
const thisImage = imageLoadEvent.currentTarget as HTMLImageElement; |
|
|
|