[#17355] status-im.utils.image-processing (#17356)

This commit is contained in:
flexsurfer 2023-09-20 16:14:53 +02:00 committed by GitHub
parent 92cc49184d
commit ddd0796381
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
(ns status-im.utils.image-processing
(ns react-native.image-resizer
(:require ["react-native-image-resizer" :default image-resizer]))
(defn resize

View File

@ -6,7 +6,7 @@
[utils.i18n :as i18n]
[react-native.permissions :as permissions]
[utils.re-frame :as rf]
[status-im.utils.image-processing :as image-processing]
[react-native.image-resizer :as image-resizer]
[taoensso.timbre :as log]
[react-native.core :as rn]))
@ -18,7 +18,7 @@
uri
(fn [width height]
(let [resize? (> (max width height) maximum-image-size-px)]
(image-processing/resize
(image-resizer/resize
uri
(if resize? maximum-image-size-px width)
(if resize? maximum-image-size-px height)