diff --git a/src/components/import/ImportSingleFile.tsx b/src/components/import/ImportSingleFile.tsx index 525ca8c..0924aac 100644 --- a/src/components/import/ImportSingleFile.tsx +++ b/src/components/import/ImportSingleFile.tsx @@ -118,19 +118,10 @@ const ImportSingleFile: Component = ({ file: file }) => { const id = exifObj.Exif[piexif.ExifIFD.ImageUniqueID]; const gps = getGps(exifObj); const date = getDate(exifObj); - const [downsizedUrl, thumbnailUrl] = await downsize( + const [downsizedUrl, bigThumbnailUrl, thumbnailUrl] = await downsize( reader.result, - [1024, 128] + [1024, 512, 128] ); - // const gps = tags.gps; - // const image = await Image.load(reader.result); - // const thumbnail = image.resize({ - // width: 256, - // interpolation: 'bilinear', - // }); - // const thumbnailUrl = thumbnail.toDataURL(); - // // const thumbnail = tags.Thumbnail; - // //const thumbnailUrl = `data:${thumbnail?.type};base64,${thumbnail?.base64}`; console.log({ caller: 'ImportSingleFile / Jpeg', file, @@ -141,7 +132,14 @@ const ImportSingleFile: Component = ({ file: file }) => { result: reader.result, exifObj, }); - setPicture({ id, gps, date, thumbnailUrl }); + setPicture({ + id, + gps, + date, + thumbnailUrl, + bigThumbnailUrl, + downsizedUrl, + }); }, false ); @@ -273,7 +271,12 @@ const ImportSingleFile: Component = ({ file: file }) => { - + +

Id: {picture()?.id}

+

Date: {picture()?.date.toString()}

+

+ Coordinates: {picture()?.gps.latitude}, {picture()?.gps.longitude} +