From 4e7f3f42f4e27f185113807933facae8ef9258be Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Mon, 10 Apr 2023 01:32:12 +0900 Subject: [PATCH] Remove reading exif from image Because it says an error when reading canvas and it is already read in Electron --- package.json | 1 - .../Modals/ImageViewer/Media.vue | 9 ---- src/renderer/components/atoms/FailoverImg.vue | 22 +-------- .../organisms/Notification/StatusReaction.vue | 2 +- src/renderer/components/organisms/Toot.vue | 1 - src/renderer/components/utils/exifImageUrl.ts | 45 ------------------- yarn.lock | 5 --- 7 files changed, 3 insertions(+), 82 deletions(-) delete mode 100644 src/renderer/components/utils/exifImageUrl.ts diff --git a/package.json b/package.json index 4db2a055..e1dfc998 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,6 @@ "auto-launch": "^5.0.5", "axios": "1.3.4", "better-sqlite3": "^8.2.0", - "blueimp-load-image": "^5.16.0", "electron-context-menu": "^3.6.1", "electron-json-storage": "^4.6.0", "electron-log": "^4.4.8", diff --git a/src/renderer/components/TimelineSpace/Modals/ImageViewer/Media.vue b/src/renderer/components/TimelineSpace/Modals/ImageViewer/Media.vue index d9ed1117..0bdeac79 100644 --- a/src/renderer/components/TimelineSpace/Modals/ImageViewer/Media.vue +++ b/src/renderer/components/TimelineSpace/Modals/ImageViewer/Media.vue @@ -11,7 +11,6 @@ import { defineComponent, ref, toRefs, watch, computed } from 'vue' import { useStore } from '@/store' import { ACTION_TYPES } from '@/store/TimelineSpace/Modals/ImageViewer' -import exifImageUrl from '@/components/utils/exifImageUrl' export default defineComponent({ name: 'Media', @@ -39,14 +38,6 @@ export default defineComponent({ watch(srcRef, async (newSrc, _oldSrc) => { imageSrc.value = newSrc - if (newSrc && !isMovie() && !isGIF() && !isAudio()) { - try { - const transformed = await exifImageUrl(newSrc) - imageSrc.value = transformed - } catch (err) { - console.error(err) - } - } }) const loaded = () => store.dispatch(`TimelineSpace/Modals/ImageViewer/${ACTION_TYPES.LOADED}`) diff --git a/src/renderer/components/atoms/FailoverImg.vue b/src/renderer/components/atoms/FailoverImg.vue index cd3a26a0..db07fb16 100644 --- a/src/renderer/components/atoms/FailoverImg.vue +++ b/src/renderer/components/atoms/FailoverImg.vue @@ -13,7 +13,6 @@