summaryrefslogtreecommitdiff
path: root/internal/media/image.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@protonmail.com>2022-01-23 14:41:58 +0100
committerLibravatar tsmethurst <tobi.smethurst@protonmail.com>2022-01-23 14:41:58 +0100
commitc157b1b20b38cc331cfd1673433d077719feef3f (patch)
tree69777c5d300ed87d0ac8bb0daf51d8ffa4c4ddb7 /internal/media/image.go
parentuse exif-terminator (diff)
downloadgotosocial-c157b1b20b38cc331cfd1673433d077719feef3f.tar.xz
rework data function to provide filesize
Diffstat (limited to 'internal/media/image.go')
-rw-r--r--internal/media/image.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/internal/media/image.go b/internal/media/image.go
index b8f00024f..e5390cee5 100644
--- a/internal/media/image.go
+++ b/internal/media/image.go
@@ -30,7 +30,6 @@ import (
"github.com/buckket/go-blurhash"
"github.com/nfnt/resize"
- "github.com/superseriousbusiness/exifremove/pkg/exifremove"
)
const (
@@ -197,22 +196,3 @@ func deriveStaticEmoji(r io.Reader, contentType string) (*imageMeta, error) {
small: out.Bytes(),
}, nil
}
-
-// purgeExif is a little wrapper for the action of removing exif data from an image.
-// Only pass pngs or jpegs to this function.
-func purgeExif(data []byte) ([]byte, error) {
- if len(data) == 0 {
- return nil, errors.New("passed image was not valid")
- }
-
- clean, err := exifremove.Remove(data)
- if err != nil {
- return nil, fmt.Errorf("could not purge exif from image: %s", err)
- }
-
- if len(clean) == 0 {
- return nil, errors.New("purged image was not valid")
- }
-
- return clean, nil
-}