Streamline GPS code

This commit is contained in:
Sam Becker 2024-06-08 18:22:33 -05:00
parent b8e1d22b64
commit 6b65adb1e5
3 changed files with 1 additions and 21 deletions

View File

@ -103,7 +103,7 @@ Application behavior can be changed by configuring the following environment var
- `NEXT_PUBLIC_STATICALLY_OPTIMIZE_OG_IMAGES = 1` enables static optimization for OG images, i.e., renders images at build time (results in increased project usage)—⚠️ _Experimental_
- `NEXT_PUBLIC_MATTE_PHOTOS = 1` constrains the size of each photo, and enables a surrounding border (potentially useful for photos with tall aspect ratios)
- `NEXT_PUBLIC_BLUR_DISABLED = 1` prevents image blur data being stored and displayed (potentially useful for limiting Postgres usage)
- `NEXT_PUBLIC_GEO_PRIVACY = 1` disables collection/display of location-based data (⚠️ re-compresses original images in order to remove identifying information)
- `NEXT_PUBLIC_GEO_PRIVACY = 1` disables collection/display of location-based data (⚠️ re-compresses uploaded images in order to remove GPS information)
- `NEXT_PUBLIC_IGNORE_PRIORITY_ORDER = 1` prevents `priority_order` field affecting photo order
- `NEXT_PUBLIC_PUBLIC_API = 1` enables public API available at `/api`
- `NEXT_PUBLIC_HIDE_REPO_LINK = 1` removes footer link to repo

View File

@ -1,6 +0,0 @@
declare module 'piexifjs' {
export function load(base64Url: string): Record<string, any>
export function dump(exifObject: Record<string, any>): string
export function insert(exifDataWithoutGps: string, base64Url: string): string
export function remove(exifData: string): string
}

View File

@ -1,14 +0,0 @@
export const b64toBlob = (
data: string,
type: string = 'image/jpeg',
): Blob => {
const byteString = atob(data.split(',')[1]);
const ab = new ArrayBuffer(byteString.length);
const ia = new Uint8Array(ab);
for (let i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i);
}
return new Blob([ab], { type });
};