diff options
author | Ollie H <renahlee@outlook.com> | 2023-05-30 17:23:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-30 19:23:55 -0500 |
commit | 072682dd9f8843787229a98fbeea24161bc0c9b4 (patch) | |
tree | 931c55dd298e36e363bb0366f41d671043f091ba /src/lib/media/manip.web.ts | |
parent | deebe18aaa883d7fcedabd594dda057f991c3026 (diff) | |
download | voidsky-072682dd9f8843787229a98fbeea24161bc0c9b4.tar.zst |
Rework scaled dimensions and compression (#737)
* Rework scaled dimensions and compression * Unbreak image / banner uploads --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/lib/media/manip.web.ts')
-rw-r--r-- | src/lib/media/manip.web.ts | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/lib/media/manip.web.ts b/src/lib/media/manip.web.ts index 85f6b6138..464802c32 100644 --- a/src/lib/media/manip.web.ts +++ b/src/lib/media/manip.web.ts @@ -1,25 +1,6 @@ import {Dimensions} from './types' import {Image as RNImage} from 'react-native-image-crop-picker' import {getDataUriSize, blobToDataUri} from './util' -import {POST_IMG_MAX} from 'lib/constants' - -export async function compressAndResizeImageForPost({ - path, - width, - height, -}: { - path: string - width: number - height: number -}): Promise<RNImage> { - // Compression is handled in `doResize` via `quality` - return await doResize(path, { - width, - height, - maxSize: POST_IMG_MAX.size, - mode: 'stretch', - }) -} export async function compressIfNeeded( img: RNImage, |