parent
92cc49184d
commit
ddd0796381
|
@ -1,4 +1,4 @@
|
||||||
(ns status-im.utils.image-processing
|
(ns react-native.image-resizer
|
||||||
(:require ["react-native-image-resizer" :default image-resizer]))
|
(:require ["react-native-image-resizer" :default image-resizer]))
|
||||||
|
|
||||||
(defn resize
|
(defn resize
|
|
@ -6,7 +6,7 @@
|
||||||
[utils.i18n :as i18n]
|
[utils.i18n :as i18n]
|
||||||
[react-native.permissions :as permissions]
|
[react-native.permissions :as permissions]
|
||||||
[utils.re-frame :as rf]
|
[utils.re-frame :as rf]
|
||||||
[status-im.utils.image-processing :as image-processing]
|
[react-native.image-resizer :as image-resizer]
|
||||||
[taoensso.timbre :as log]
|
[taoensso.timbre :as log]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
uri
|
uri
|
||||||
(fn [width height]
|
(fn [width height]
|
||||||
(let [resize? (> (max width height) maximum-image-size-px)]
|
(let [resize? (> (max width height) maximum-image-size-px)]
|
||||||
(image-processing/resize
|
(image-resizer/resize
|
||||||
uri
|
uri
|
||||||
(if resize? maximum-image-size-px width)
|
(if resize? maximum-image-size-px width)
|
||||||
(if resize? maximum-image-size-px height)
|
(if resize? maximum-image-size-px height)
|
||||||
|
|
Loading…
Reference in New Issue