expo-image 2.4.0-canary-20250713-8f814f8 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/CHANGELOG.md +21 -18
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/expo/modules/image/ExpoImageModule.kt +0 -20
  4. package/android/src/main/java/expo/modules/image/ExpoImageViewWrapper.kt +5 -24
  5. package/android/src/main/java/expo/modules/image/blurhash/BlurhashDecoder.kt +10 -1
  6. package/android/src/main/java/expo/modules/image/events/GlideRequestListener.kt +20 -12
  7. package/android/src/main/java/expo/modules/image/okhttp/GlideUrlWrapperLoader.kt +1 -1
  8. package/build/ExpoImage.web.d.ts +1 -1
  9. package/build/ExpoImage.web.d.ts.map +1 -1
  10. package/build/Image.d.ts +2 -3
  11. package/build/Image.d.ts.map +1 -1
  12. package/build/Image.types.d.ts +5 -9
  13. package/build/Image.types.d.ts.map +1 -1
  14. package/build/web/ImageWrapper.d.ts.map +1 -1
  15. package/expo-module.config.json +1 -1
  16. package/ios/ExpoImage.podspec +1 -1
  17. package/ios/ImageModule.swift +11 -20
  18. package/ios/ImageView.swift +3 -5
  19. package/ios/Loaders/PhotoLibraryAssetLoader.swift +1 -1
  20. package/local-maven-repo/BareExpo/expo.modules.image/{2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8-sources.jar → 2.4.1/expo.modules.image-2.4.1-sources.jar} +0 -0
  21. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1-sources.jar.md5 +1 -0
  22. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1-sources.jar.sha1 +1 -0
  23. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1-sources.jar.sha256 +1 -0
  24. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1-sources.jar.sha512 +1 -0
  25. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1.aar +0 -0
  26. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1.aar.md5 +1 -0
  27. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1.aar.sha1 +1 -0
  28. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1.aar.sha256 +1 -0
  29. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1.aar.sha512 +1 -0
  30. package/local-maven-repo/BareExpo/expo.modules.image/{2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8.module → 2.4.1/expo.modules.image-2.4.1.module} +24 -24
  31. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1.module.md5 +1 -0
  32. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1.module.sha1 +1 -0
  33. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1.module.sha256 +1 -0
  34. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1.module.sha512 +1 -0
  35. package/local-maven-repo/BareExpo/expo.modules.image/{2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8.pom → 2.4.1/expo.modules.image-2.4.1.pom} +2 -2
  36. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1.pom.md5 +1 -0
  37. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1.pom.sha1 +1 -0
  38. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1.pom.sha256 +1 -0
  39. package/local-maven-repo/BareExpo/expo.modules.image/2.4.1/expo.modules.image-2.4.1.pom.sha512 +1 -0
  40. package/local-maven-repo/BareExpo/expo.modules.image/maven-metadata.xml +4 -4
  41. package/local-maven-repo/BareExpo/expo.modules.image/maven-metadata.xml.md5 +1 -1
  42. package/local-maven-repo/BareExpo/expo.modules.image/maven-metadata.xml.sha1 +1 -1
  43. package/local-maven-repo/BareExpo/expo.modules.image/maven-metadata.xml.sha256 +1 -1
  44. package/local-maven-repo/BareExpo/expo.modules.image/maven-metadata.xml.sha512 +1 -1
  45. package/package.json +5 -4
  46. package/src/ExpoImage.web.tsx +1 -2
  47. package/src/Image.tsx +3 -4
  48. package/src/Image.types.ts +5 -9
  49. package/src/web/ImageWrapper.tsx +1 -8
  50. package/android/src/main/java/expo/modules/image/blurhash/BlurhashEncoder.kt +0 -112
  51. package/android/src/main/java/expo/modules/image/blurhash/BlurhashHelpers.kt +0 -38
  52. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8-sources.jar.md5 +0 -1
  53. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8-sources.jar.sha1 +0 -1
  54. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8-sources.jar.sha256 +0 -1
  55. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8-sources.jar.sha512 +0 -1
  56. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8.aar +0 -0
  57. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8.aar.md5 +0 -1
  58. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8.aar.sha1 +0 -1
  59. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8.aar.sha256 +0 -1
  60. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8.aar.sha512 +0 -1
  61. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8.module.md5 +0 -1
  62. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8.module.sha1 +0 -1
  63. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8.module.sha256 +0 -1
  64. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8.module.sha512 +0 -1
  65. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8.pom.md5 +0 -1
  66. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8.pom.sha1 +0 -1
  67. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8.pom.sha256 +0 -1
  68. package/local-maven-repo/BareExpo/expo.modules.image/2.4.0-canary-20250713-8f814f8/expo.modules.image-2.4.0-canary-20250713-8f814f8.pom.sha512 +0 -1
package/CHANGELOG.md CHANGED
@@ -6,27 +6,34 @@
6
6
 
7
7
  ### 🎉 New features
8
8
 
9
- - Add support for `ImageRef` source in `generateBlurhashAsync` ([#37901](https://github.com/expo/expo/pull/37901) by [@Wenszel](https://github.com/Wenszel))
10
- - [Android] Add generateBlurhashAsync ([#37817](https://github.com/expo/expo/pull/37817) by [@Wenszel](https://github.com/Wenszel))
11
- - [iOS] Add a new prop - `enforceEarlyResizing` to reduce the memory usage of the image view. ([#37909](https://github.com/expo/expo/pull/37909) by [@lukmccall](https://github.com/lukmccall))
9
+ ### 🐛 Bug fixes
10
+
11
+ ### 💡 Others
12
+
13
+ ## 2.4.1 — 2025-10-07
12
14
 
13
15
  ### 🐛 Bug fixes
14
16
 
15
- - [iOS] Speed up displaying local assets. ([#37795](https://github.com/expo/expo/pull/37795) by [@aleqsio](https://github.com/aleqsio))
16
- - [Android] Fix animation resuming by casting image to GifDrawable. ([#37363](https://github.com/expo/expo/pull/37363) by [@Wenszel](https://github.com/Wenszel))
17
- - [Web] Fix `alt` as an alias for `accessibilityLabel` ([#37682](https://github.com/expo/expo/pull/37682) by [@huextrat](https://github.com/huextrat))
17
+ - [Android] Fixed `You can't start or clear loads in RequestListener or Target callbacks`. ([#40212](https://github.com/expo/expo/pull/40212) by [@lukmccall](https://github.com/lukmccall))
18
18
 
19
- ### 💡 Others
19
+ ## 2.4.0 — 2025-07-17
20
20
 
21
- ### 📚 3rd party library updates
21
+ ### 🎉 New features
22
+
23
+ - [iOS] Add a new prop - `enforceEarlyResizing` to reduce the memory usage of the image view. ([#37909](https://github.com/expo/expo/pull/37909) by [@lukmccall](https://github.com/lukmccall))
24
+
25
+ ### 🐛 Bug fixes
26
+
27
+ - [iOS] Speed up displaying local assets. ([#37795](https://github.com/expo/expo/pull/37795) by [@aleqsio](https://github.com/aleqsio))
28
+ - [iOS] Fix some operation were incorrectly cancelled. ([#37987](https://github.com/expo/expo/pull/37987) by [@lukmccall](https://github.com/lukmccall))
22
29
 
23
- ## 2.3.2 - 2025-07-01
30
+ ## 2.3.2 2025-07-01
24
31
 
25
32
  ### 🐛 Bug fixes
26
33
 
27
34
  - [iOS] Use specified cache type when no transformation is applied ([#37777](https://github.com/expo/expo/pull/37777) by [@jakex7](https://github.com/jakex7))
28
35
 
29
- ## 2.3.1 - 2025-07-01
36
+ ## 2.3.1 2025-07-01
30
37
 
31
38
  ### 🐛 Bug fixes
32
39
 
@@ -36,21 +43,17 @@
36
43
 
37
44
  - [Android] Bumped GIF Glide plugin to 3.0.5 for Android 16KB page size support. ([#37454](https://github.com/expo/expo/pull/37454) by [@kudo](https://github.com/kudo))
38
45
 
39
- ## 2.3.0 - 2025-06-11
46
+ ## 2.3.0 2025-06-11
40
47
 
41
48
  ### 🛠 Breaking changes
42
49
 
43
50
  - [iOS] `useAppleWebpCodec` has been moved from the source object to the component's prop to make it usable with the local assets. ([#37300](https://github.com/expo/expo/pull/37300) by [@tsapeta](https://github.com/tsapeta))
44
51
 
45
- ### 🐛 Bug fixes
46
-
47
- - [iOS] Fix blurry images when using `tintColor` by scaling `imageThumbnailPixelSize` with screen density. ([#37235](https://github.com/expo/expo/pull/37235) by [@hirbod](https://github.com/hirbod))
48
-
49
- ## 2.2.1 - 2025-06-10
52
+ ## 2.2.1 2025-06-10
50
53
 
51
54
  _This version does not introduce any user-facing changes._
52
55
 
53
- ## 2.2.0 - 2025-06-04
56
+ ## 2.2.0 2025-06-04
54
57
 
55
58
  ### 🎉 New features
56
59
 
@@ -61,7 +64,7 @@ _This version does not introduce any user-facing changes._
61
64
  - Fix React Server Components support. ([#36801](https://github.com/expo/expo/pull/36801) by [@EvanBacon](https://github.com/EvanBacon))
62
65
  - [iOS] Fix PhotoLibrary assets being scaled twice. ([#36776](https://github.com/expo/expo/pull/36776) by [@alanjhughes](https://github.com/alanjhughes))
63
66
  - [iOS] Don't add transformers when unnecessary. ([#36884](https://github.com/expo/expo/pull/36884) by [@jakex7](https://github.com/jakex7))
64
- - [Web] Fix `tintColor` in React 19. ([#37133](https://github.com/expo/expo/pull/37133) by [@bradleyayers](https://github.com/bradleyayers))
67
+ - [iOS] Fix blurry images when using `tintColor` by scaling `imageThumbnailPixelSize` with screen density. ([#37235](https://github.com/expo/expo/pull/37235) by [@hirbod](https://github.com/hirbod))
65
68
 
66
69
  ## 2.1.7 — 2025-05-06
67
70
 
@@ -8,7 +8,7 @@ android {
8
8
  namespace "expo.modules.image"
9
9
  defaultConfig {
10
10
  versionCode 1
11
- versionName "2.4.0-canary-20250713-8f814f8"
11
+ versionName "2.4.1"
12
12
  consumerProguardFiles("proguard-rules.pro")
13
13
 
14
14
  buildConfigField("boolean", "ALLOW_GLIDE_LOGS", project.properties.get("EXPO_ALLOW_GLIDE_LOGS", "false"))
@@ -5,7 +5,6 @@ package expo.modules.image
5
5
  import android.graphics.Bitmap
6
6
  import android.graphics.drawable.BitmapDrawable
7
7
  import android.graphics.drawable.Drawable
8
- import androidx.core.graphics.drawable.toBitmap
9
8
  import androidx.core.graphics.drawable.toBitmapOrNull
10
9
  import androidx.core.view.doOnDetach
11
10
  import com.bumptech.glide.Glide
@@ -20,7 +19,6 @@ import com.bumptech.glide.request.target.Target
20
19
  import com.github.penfeizhou.animation.apng.APNGDrawable
21
20
  import com.github.penfeizhou.animation.gif.GifDrawable
22
21
  import com.github.penfeizhou.animation.webp.WebPDrawable
23
- import expo.modules.image.blurhash.BlurhashEncoder
24
22
  import expo.modules.image.enums.ContentFit
25
23
  import expo.modules.image.enums.Priority
26
24
  import expo.modules.image.records.CachePolicy
@@ -38,12 +36,8 @@ import expo.modules.kotlin.functions.Queues
38
36
  import expo.modules.kotlin.modules.Module
39
37
  import expo.modules.kotlin.modules.ModuleDefinition
40
38
  import expo.modules.kotlin.sharedobjects.SharedRef
41
- import expo.modules.kotlin.types.Either
42
39
  import expo.modules.kotlin.types.EitherOfThree
43
40
  import expo.modules.kotlin.types.toKClass
44
- import kotlinx.coroutines.Dispatchers
45
- import kotlinx.coroutines.withContext
46
- import java.net.URL
47
41
 
48
42
  class ExpoImageModule : Module() {
49
43
  override fun definition() = ModuleDefinition {
@@ -118,20 +112,6 @@ class ExpoImageModule : Module() {
118
112
  ImageLoadTask(appContext, source, options ?: ImageLoadOptions()).load()
119
113
  }
120
114
 
121
- AsyncFunction("generateBlurhashAsync") Coroutine { source: Either<URL, Image>, numberOfComponents: Pair<Int, Int> ->
122
- val image = source.let {
123
- if (it.`is`(Image::class)) {
124
- it.get(Image::class)
125
- } else {
126
- ImageLoadTask(appContext, SourceMap(uri = it.get(URL::class).toString()), ImageLoadOptions()).load()
127
- }
128
- }
129
- val blurHash = withContext(Dispatchers.Default) {
130
- BlurhashEncoder.encode(image.ref.toBitmap(), numberOfComponents)
131
- }
132
- blurHash
133
- }
134
-
135
115
  Class(Image::class) {
136
116
  Property("width") { image: Image ->
137
117
  image.ref.intrinsicWidth
@@ -18,7 +18,6 @@ import com.bumptech.glide.RequestManager
18
18
  import com.bumptech.glide.load.engine.DiskCacheStrategy
19
19
  import com.bumptech.glide.load.resource.bitmap.DownsampleStrategy
20
20
  import com.bumptech.glide.request.RequestOptions
21
- import com.github.penfeizhou.animation.gif.GifDrawable
22
21
  import expo.modules.image.enums.ContentFit
23
22
  import expo.modules.image.enums.Priority
24
23
  import expo.modules.image.events.GlideRequestListener
@@ -170,32 +169,14 @@ class ExpoImageViewWrapper(context: Context, appContext: AppContext) : ExpoView(
170
169
  internal var cachePolicy: CachePolicy = CachePolicy.DISK
171
170
 
172
171
  fun setIsAnimating(setAnimating: Boolean) {
173
- // Animatable animations always start from the beginning when resumed.
174
- // So we check first if the resource is a GifDrawable, because it can continue
175
- // from where it was paused.
176
- when (val resource = activeView.drawable) {
177
- is GifDrawable -> setIsAnimating(resource, setAnimating)
178
- is Animatable -> setIsAnimating(resource, setAnimating)
179
- }
180
- }
172
+ val resource = activeView.drawable
181
173
 
182
- private fun setIsAnimating(resource: GifDrawable, setAnimating: Boolean) {
183
- if (setAnimating) {
184
- if (resource.isPaused) {
185
- resource.resume()
186
- } else {
174
+ if (resource is Animatable) {
175
+ if (setAnimating) {
187
176
  resource.start()
177
+ } else {
178
+ resource.stop()
188
179
  }
189
- } else {
190
- resource.pause()
191
- }
192
- }
193
-
194
- private fun setIsAnimating(resource: Animatable, setAnimating: Boolean) {
195
- if (setAnimating) {
196
- resource.start()
197
- } else {
198
- resource.stop()
199
180
  }
200
181
  }
201
182
 
@@ -74,7 +74,16 @@ object BlurhashDecoder {
74
74
  val r = colorEnc shr 16
75
75
  val g = (colorEnc shr 8) and 255
76
76
  val b = colorEnc and 255
77
- return floatArrayOf(BlurhashHelpers.srgbToLinear(r), BlurhashHelpers.srgbToLinear(g), BlurhashHelpers.srgbToLinear(b))
77
+ return floatArrayOf(srgbToLinear(r), srgbToLinear(g), srgbToLinear(b))
78
+ }
79
+
80
+ private fun srgbToLinear(colorEnc: Int): Float {
81
+ val v = colorEnc / 255f
82
+ return if (v <= 0.04045f) {
83
+ (v / 12.92f)
84
+ } else {
85
+ ((v + 0.055f) / 1.055f).pow(2.4f)
86
+ }
78
87
  }
79
88
 
80
89
  private fun decodeAc(value: Int, maxAc: Float): FloatArray {
@@ -13,6 +13,7 @@ import expo.modules.image.records.ImageErrorEvent
13
13
  import expo.modules.image.records.ImageLoadEvent
14
14
  import expo.modules.image.records.ImageSource
15
15
  import expo.modules.image.svg.SVGPictureDrawable
16
+ import kotlinx.coroutines.launch
16
17
  import java.lang.ref.WeakReference
17
18
  import java.util.Locale
18
19
 
@@ -49,20 +50,27 @@ class GlideRequestListener(
49
50
  dataSource: DataSource,
50
51
  isFirstResource: Boolean
51
52
  ): Boolean {
52
- val intrinsicWidth = (resource as? SVGPictureDrawable)?.svgIntrinsicWidth ?: resource.intrinsicWidth
53
- val intrinsicHeight = (resource as? SVGPictureDrawable)?.svgIntrinsicHeight ?: resource.intrinsicHeight
54
- expoImageViewWrapper.get()?.onLoad?.invoke(
55
- ImageLoadEvent(
56
- cacheType = ImageCacheType.fromNativeValue(dataSource).name.lowercase(Locale.getDefault()),
57
- source = ImageSource(
58
- url = model.toString(),
59
- width = intrinsicWidth,
60
- height = intrinsicHeight,
61
- mediaType = null, // TODO(@lukmccall): add mediaType
62
- isAnimated = resource is Animatable
53
+ val intrinsicWidth = (resource as? SVGPictureDrawable)?.svgIntrinsicWidth
54
+ ?: resource.intrinsicWidth
55
+ val intrinsicHeight = (resource as? SVGPictureDrawable)?.svgIntrinsicHeight
56
+ ?: resource.intrinsicHeight
57
+
58
+ val imageWrapper = expoImageViewWrapper.get() ?: return false
59
+ val appContext = imageWrapper.appContext
60
+ appContext.mainQueue.launch {
61
+ imageWrapper.onLoad.invoke(
62
+ ImageLoadEvent(
63
+ cacheType = ImageCacheType.fromNativeValue(dataSource).name.lowercase(Locale.getDefault()),
64
+ source = ImageSource(
65
+ url = model.toString(),
66
+ width = intrinsicWidth,
67
+ height = intrinsicHeight,
68
+ mediaType = null, // TODO(@lukmccall): add mediaType
69
+ isAnimated = resource is Animatable
70
+ )
63
71
  )
64
72
  )
65
- )
73
+ }
66
74
 
67
75
  return false
68
76
  }
@@ -28,7 +28,7 @@ class GlideUrlWrapperLoader(
28
28
  originalResponse
29
29
  .newBuilder()
30
30
  .body(
31
- ProgressResponseBody(requireNotNull(originalResponse.body)) { bytesWritten, contentLength, done ->
31
+ ProgressResponseBody(originalResponse.body) { bytesWritten, contentLength, done ->
32
32
  model.progressListener?.onProgress(bytesWritten, contentLength, done)
33
33
  }
34
34
  )
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { ImageNativeProps } from './Image.types';
3
- export default function ExpoImage({ source, placeholder, contentFit, contentPosition, placeholderContentFit, cachePolicy, onLoad, transition, onError, responsivePolicy, onLoadEnd, onDisplay, priority, blurRadius, recyclingKey, style, nativeViewRef, accessibilityLabel, alt, tintColor, containerViewRef, ...props }: ImageNativeProps): React.JSX.Element;
3
+ export default function ExpoImage({ source, placeholder, contentFit, contentPosition, placeholderContentFit, cachePolicy, onLoad, transition, onError, responsivePolicy, onLoadEnd, onDisplay, priority, blurRadius, recyclingKey, style, nativeViewRef, accessibilityLabel, tintColor, containerViewRef, ...props }: ImageNativeProps): React.JSX.Element;
4
4
  //# sourceMappingURL=ExpoImage.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoImage.web.d.ts","sourceRoot":"","sources":["../src/ExpoImage.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,gBAAgB,EAA6C,MAAM,eAAe,CAAC;AAsDjG,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,MAAM,EACN,WAAW,EACX,UAAU,EACV,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,MAAM,EACN,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,KAAK,EACL,aAAa,EACb,kBAAkB,EAClB,GAAG,EACH,SAAS,EACT,gBAAgB,EAChB,GAAG,KAAK,EACT,EAAE,gBAAgB,qBA0FlB"}
1
+ {"version":3,"file":"ExpoImage.web.d.ts","sourceRoot":"","sources":["../src/ExpoImage.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,gBAAgB,EAA6C,MAAM,eAAe,CAAC;AAsDjG,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,MAAM,EACN,WAAW,EACX,UAAU,EACV,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,MAAM,EACN,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,KAAK,EACL,aAAa,EACb,kBAAkB,EAClB,SAAS,EACT,gBAAgB,EAChB,GAAG,KAAK,EACT,EAAE,gBAAgB,qBA0FlB"}
package/build/Image.d.ts CHANGED
@@ -66,14 +66,13 @@ export declare class Image extends React.PureComponent<ImageProps> {
66
66
  static getCachePathAsync(cacheKey: string): Promise<string | null>;
67
67
  /**
68
68
  * Asynchronously generates a [Blurhash](https://blurha.sh) from an image.
69
- * @param source - The image source, either a URL (string) or an ImageRef
69
+ * @param url - The URL of the image to generate a blurhash from.
70
70
  * @param numberOfComponents - The number of components to encode the blurhash with.
71
71
  * Must be between 1 and 9. Defaults to `[4, 3]`.
72
- * @platform android
73
72
  * @platform ios
74
73
  * @return A promise resolving to the blurhash string.
75
74
  */
76
- static generateBlurhashAsync(source: string | ImageRef, numberOfComponents: [number, number] | {
75
+ static generateBlurhashAsync(url: string, numberOfComponents: [number, number] | {
77
76
  width: number;
78
77
  height: number;
79
78
  }): Promise<string | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../src/Image.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,WAAW,EACZ,MAAM,eAAe,CAAC;AAQvB,qBAAa,KAAM,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IACxD,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IACjD,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;gBAEnC,KAAK,EAAE,UAAU;IAO7B,gBAAgB,2BAMd;IAEF;;OAEG;IACH,MAAM,CAAC,KAAK,kBAAqB;IAEjC;;;;;;;;;;OAUG;WACU,QAAQ,CACnB,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EACvB,WAAW,CAAC,EAAE,oBAAoB,CAAC,aAAa,CAAC,GAChD,OAAO,CAAC,OAAO,CAAC;IACnB;;;;;;;;;;OAUG;WACU,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;IAoBhG;;;;;;;OAOG;WACU,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC;IAIjD;;;;;;;OAOG;WACU,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;IAI/C;;;;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MAAM,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,EACrC,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,QAAQ,CAAC;IAKpB,MAAM;CA6CP"}
@@ -140,7 +140,7 @@ export interface ImageProps extends Omit<ViewProps, 'style' | 'children'> {
140
140
  blurRadius?: number;
141
141
  /**
142
142
  * A color used to tint template images (a bitmap image where only the opacity matters).
143
- * The color is applied to every non-transparent pixel, causing the image's shape to adopt that color.
143
+ * The color is applied to every non-transparent pixel, causing the images shape to adopt that color.
144
144
  * This effect is not applied to placeholders.
145
145
  * @default null
146
146
  */
@@ -264,12 +264,12 @@ export interface ImageProps extends Omit<ViewProps, 'style' | 'children'> {
264
264
  */
265
265
  accessible?: boolean;
266
266
  /**
267
- * The text that's read by the screen reader when the user interacts with the image. Sets the `alt` tag on web which is used for web crawlers and link traversal.
267
+ * The text that's read by the screen reader when the user interacts with the image. Sets the the `alt` tag on web which is used for web crawlers and link traversal.
268
268
  * @default undefined
269
269
  */
270
270
  accessibilityLabel?: string;
271
271
  /**
272
- * The text that's read by the screen reader when the user interacts with the image. Sets the `alt` tag on web which is used for web crawlers and link traversal. Is an alias for `accessibilityLabel`.
272
+ * The text that's read by the screen reader when the user interacts with the image. Sets the the `alt` tag on web which is used for web crawlers and link traversal. Is an alias for `accessibilityLabel`.
273
273
  *
274
274
  * @alias accessibilityLabel
275
275
  * @default undefined
@@ -384,14 +384,10 @@ export type ImageContentPosition =
384
384
  bottom?: ImageContentPositionValue;
385
385
  left?: ImageContentPositionValue;
386
386
  } | ImageContentPositionString;
387
- /**
388
- * It allows you to use an image as a background while rendering other content on top of it.
389
- * It extends all `Image` props but provides separate styling controls for the container and the background image itself.
390
- */
391
387
  export interface ImageBackgroundProps extends Omit<ImageProps, 'style'> {
392
- /** The style of the image container. */
388
+ /** The style of the image container */
393
389
  style?: StyleProp<ViewStyle> | undefined;
394
- /** Style object for the image. */
390
+ /** Style object for the image */
395
391
  imageStyle?: StyleProp<RNImageStyle> | undefined;
396
392
  /** @hidden */
397
393
  children?: React.ReactNode | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Image.types.d.ts","sourceRoot":"","sources":["../src/Image.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEjG,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,MAAM,MAAM,WAAW,GAAG;IACxB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,YAAY,CAAC;AAEtC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;AAEnF;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,KAAK,CAAC;AAE/C;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,SAAS,EAAE,OA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;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"ImageWrapper.d.ts","sourceRoot":"","sources":["../../src/web/ImageWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAGrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAqBzD,QAAA,MAAM,YAAY,4FA4DjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -8,7 +8,7 @@
8
8
  "publication": {
9
9
  "groupId": "BareExpo",
10
10
  "artifactId": "expo.modules.image",
11
- "version": "2.4.0-canary-20250713-8f814f8",
11
+ "version": "2.4.1",
12
12
  "repository": "local-maven-repo"
13
13
  }
14
14
  }
@@ -14,7 +14,7 @@ Pod::Spec.new do |s|
14
14
  :ios => '15.1',
15
15
  :tvos => '15.1'
16
16
  }
17
- s.swift_version = '5.9'
17
+ s.swift_version = '5.4'
18
18
  s.source = { git: 'https://github.com/expo/expo.git' }
19
19
  s.static_framework = true
20
20
 
@@ -170,28 +170,19 @@ public final class ImageModule: Module {
170
170
  }
171
171
  }
172
172
 
173
- AsyncFunction("generateBlurhashAsync") { (source: Either<Image, URL>, numberOfComponents: CGSize, promise: Promise) in
173
+ AsyncFunction("generateBlurhashAsync") { (url: URL, numberOfComponents: CGSize, promise: Promise) in
174
174
  let downloader = SDWebImageDownloader()
175
- let parsedNumberOfComponents = (width: Int(numberOfComponents.width), height: Int(numberOfComponents.height))
176
-
177
- if let image: Image = source.get() {
178
- if let blurhashString = blurhash(fromImage: image.ref, numberOfComponents: parsedNumberOfComponents) {
179
- promise.resolve(blurhashString)
180
- } else {
181
- promise.reject(BlurhashGenerationException())
182
- }
183
- } else if let url: URL = source.get() {
184
- downloader.downloadImage(with: url, progress: nil, completed: { image, _, _, _ in
185
- DispatchQueue.global().async {
186
- if let downloadedImage = image {
187
- let blurhashString = blurhash(fromImage: downloadedImage, numberOfComponents: parsedNumberOfComponents)
188
- promise.resolve(blurhashString)
189
- } else {
190
- promise.reject(BlurhashGenerationException())
191
- }
175
+ let parsedNumberOfComponents = (Int(numberOfComponents.width), Int(numberOfComponents.height))
176
+ downloader.downloadImage(with: url, progress: nil, completed: { image, _, _, _ in
177
+ DispatchQueue.global().async {
178
+ if let downloadedImage = image {
179
+ let blurhashString = blurhash(fromImage: downloadedImage, numberOfComponents: parsedNumberOfComponents)
180
+ promise.resolve(blurhashString)
181
+ } else {
182
+ promise.reject(BlurhashGenerationException())
192
183
  }
193
- })
194
- }
184
+ }
185
+ })
195
186
  }
196
187
 
197
188
  AsyncFunction("clearMemoryCache") { () -> Bool in
@@ -121,12 +121,10 @@ public final class ImageView: ExpoView {
121
121
  if window == nil {
122
122
  // Cancel pending requests when the view is unmounted.
123
123
  cancelPendingOperation()
124
- } else if !bounds.isEmpty {
125
- // Reload the image after mounting the view with non-empty bounds.
126
- reload()
127
- } else {
128
- loadPlaceholderIfNecessary()
124
+ return
129
125
  }
126
+
127
+ loadPlaceholderIfNecessary()
130
128
  }
131
129
 
132
130
  public override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
@@ -113,7 +113,7 @@ private func requestAsset(
113
113
  if let scale = context?[ImageView.screenScaleKey] as? Double,
114
114
  let containerSize = context?[ImageView.frameSizeKey] as? CGSize,
115
115
  let contentFit = context?[ImageView.contentFitKey] as? ContentFit {
116
- let targetSize = idealSize(
116
+ targetSize = idealSize(
117
117
  contentPixelSize: CGSize(width: asset.pixelWidth, height: asset.pixelHeight),
118
118
  containerSize: containerSize,
119
119
  scale: scale,
@@ -0,0 +1 @@
1
+ 27d737aa1672f3be8e2d450f37194caf751ed9b1
@@ -0,0 +1 @@
1
+ e3ae8c9f483c6f87aa88edc68231f75d5697f8399e055c0fffe77c31449c527e
@@ -0,0 +1 @@
1
+ 7026dec031b159efa6c78d21c534bfaf8d01e2b818e01049efd859b655024323df9a0a4675963a2caaa2606b277e7401b2c6317d80ca6744e8faddfebd603746
@@ -0,0 +1 @@
1
+ 9ec5987601e4fe8203b6cf60a02c0560
@@ -0,0 +1 @@
1
+ 23736c6f01489e1e72f412894dc0be85660b5ee4
@@ -0,0 +1 @@
1
+ 090df8b32c8f1cfe2df3de57d3e1341872e3eb7ff2cae2fb0c6e511bab073d89
@@ -0,0 +1 @@
1
+ 9bfff739454816eb7d7537195c3dd41424dfc6edc7102567d5ca105f75c6208752df3f0d3eef0632dd9a416a17b7ebe093a12ff0496d4fc637c0cbee3c1bd999
@@ -3,14 +3,14 @@
3
3
  "component": {
4
4
  "group": "BareExpo",
5
5
  "module": "expo.modules.image",
6
- "version": "2.4.0-canary-20250713-8f814f8",
6
+ "version": "2.4.1",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
10
10
  },
11
11
  "createdBy": {
12
12
  "gradle": {
13
- "version": "8.14"
13
+ "version": "8.13"
14
14
  }
15
15
  },
16
16
  "variants": [
@@ -54,13 +54,13 @@
54
54
  ],
55
55
  "files": [
56
56
  {
57
- "name": "expo.modules.image-2.4.0-canary-20250713-8f814f8.aar",
58
- "url": "expo.modules.image-2.4.0-canary-20250713-8f814f8.aar",
59
- "size": 293614,
60
- "sha512": "5928b97432f974641d14f99976ddd03c1933731a6dc215222f3635e8fd3a93fc807eb2068ac61b5618ade31e881c73cba403dec7737c0ad5ea15b23e146c9b87",
61
- "sha256": "28459572fbb29787a5b5eaab8cbec8d65ebcb8b1bff80d4b41020b76188714dc",
62
- "sha1": "d892986ab6d024ecfd622bf341abc5e0852b67e6",
63
- "md5": "987b16fc46ba4dfb8d53af2daf99fc7a"
57
+ "name": "expo.modules.image-2.4.1.aar",
58
+ "url": "expo.modules.image-2.4.1.aar",
59
+ "size": 281625,
60
+ "sha512": "9bfff739454816eb7d7537195c3dd41424dfc6edc7102567d5ca105f75c6208752df3f0d3eef0632dd9a416a17b7ebe093a12ff0496d4fc637c0cbee3c1bd999",
61
+ "sha256": "090df8b32c8f1cfe2df3de57d3e1341872e3eb7ff2cae2fb0c6e511bab073d89",
62
+ "sha1": "23736c6f01489e1e72f412894dc0be85660b5ee4",
63
+ "md5": "9ec5987601e4fe8203b6cf60a02c0560"
64
64
  }
65
65
  ]
66
66
  },
@@ -77,7 +77,7 @@
77
77
  "group": "org.jetbrains.kotlin",
78
78
  "module": "kotlin-stdlib-jdk7",
79
79
  "version": {
80
- "requires": "2.1.20"
80
+ "requires": "2.0.21"
81
81
  }
82
82
  },
83
83
  {
@@ -143,13 +143,13 @@
143
143
  ],
144
144
  "files": [
145
145
  {
146
- "name": "expo.modules.image-2.4.0-canary-20250713-8f814f8.aar",
147
- "url": "expo.modules.image-2.4.0-canary-20250713-8f814f8.aar",
148
- "size": 293614,
149
- "sha512": "5928b97432f974641d14f99976ddd03c1933731a6dc215222f3635e8fd3a93fc807eb2068ac61b5618ade31e881c73cba403dec7737c0ad5ea15b23e146c9b87",
150
- "sha256": "28459572fbb29787a5b5eaab8cbec8d65ebcb8b1bff80d4b41020b76188714dc",
151
- "sha1": "d892986ab6d024ecfd622bf341abc5e0852b67e6",
152
- "md5": "987b16fc46ba4dfb8d53af2daf99fc7a"
146
+ "name": "expo.modules.image-2.4.1.aar",
147
+ "url": "expo.modules.image-2.4.1.aar",
148
+ "size": 281625,
149
+ "sha512": "9bfff739454816eb7d7537195c3dd41424dfc6edc7102567d5ca105f75c6208752df3f0d3eef0632dd9a416a17b7ebe093a12ff0496d4fc637c0cbee3c1bd999",
150
+ "sha256": "090df8b32c8f1cfe2df3de57d3e1341872e3eb7ff2cae2fb0c6e511bab073d89",
151
+ "sha1": "23736c6f01489e1e72f412894dc0be85660b5ee4",
152
+ "md5": "9ec5987601e4fe8203b6cf60a02c0560"
153
153
  }
154
154
  ]
155
155
  },
@@ -163,13 +163,13 @@
163
163
  },
164
164
  "files": [
165
165
  {
166
- "name": "expo.modules.image-2.4.0-canary-20250713-8f814f8-sources.jar",
167
- "url": "expo.modules.image-2.4.0-canary-20250713-8f814f8-sources.jar",
168
- "size": 66715,
169
- "sha512": "5088775ebe8dbdd3636ae44627d45f466d3b26af289ccd64cc7f59a1db50045ec4c246dfacdfa80fdedd21b09f837215dd2f0843c8915c10afe74400ec3e626c",
170
- "sha256": "047cf4256d9f1f9d37b874fe403d46abd838a59bbdf3d5b923d25b546242d99f",
171
- "sha1": "f59c1a61e799d72cf2da93e51bdb6bfc76a1fecb",
172
- "md5": "fb1a021a3c959caf9c844732221afe77"
166
+ "name": "expo.modules.image-2.4.1-sources.jar",
167
+ "url": "expo.modules.image-2.4.1-sources.jar",
168
+ "size": 64264,
169
+ "sha512": "7026dec031b159efa6c78d21c534bfaf8d01e2b818e01049efd859b655024323df9a0a4675963a2caaa2606b277e7401b2c6317d80ca6744e8faddfebd603746",
170
+ "sha256": "e3ae8c9f483c6f87aa88edc68231f75d5697f8399e055c0fffe77c31449c527e",
171
+ "sha1": "27d737aa1672f3be8e2d450f37194caf751ed9b1",
172
+ "md5": "31066d8f84feb54a65cdfd96321bd06e"
173
173
  }
174
174
  ]
175
175
  }
@@ -0,0 +1 @@
1
+ b7b6e5dbd6212bf92d25ad13d030f1e6b1b8c459
@@ -0,0 +1 @@
1
+ f118ddad7ad3387c7bc772b35eed961360f434efd2de489236ca4c0ed34cd4c1
@@ -0,0 +1 @@
1
+ 31d613495280be0bafcf4ed3e948e112e5f396f5a25c7e8979c743be05090eefe289ea9436d640015bc7d04746a80e24a9d223dccd1bddc3723f5b86a1de7694
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>BareExpo</groupId>
11
11
  <artifactId>expo.modules.image</artifactId>
12
- <version>2.4.0-canary-20250713-8f814f8</version>
12
+ <version>2.4.1</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.image</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -52,7 +52,7 @@
52
52
  <dependency>
53
53
  <groupId>org.jetbrains.kotlin</groupId>
54
54
  <artifactId>kotlin-stdlib-jdk7</artifactId>
55
- <version>2.1.20</version>
55
+ <version>2.0.21</version>
56
56
  <scope>runtime</scope>
57
57
  </dependency>
58
58
  <dependency>
@@ -0,0 +1 @@
1
+ b7db7860f58c5de6f912d224531e4e33
@@ -0,0 +1 @@
1
+ a91da7f0b38fdf1dd4a28ad41e009effacf49973
@@ -0,0 +1 @@
1
+ f4f8eefa192d2a22cb608412703d0a4177204e248e272efdd6abaa6a97170bfc
@@ -0,0 +1 @@
1
+ 405c869079245cf39c17481b1a238b46f3d0b45337704bfae8e43f0a0a1483b6375bc1c665cb5dea24b8b9a8bf75900300832190d05b161048d1e7b8465d09b1
@@ -3,11 +3,11 @@
3
3
  <groupId>BareExpo</groupId>
4
4
  <artifactId>expo.modules.image</artifactId>
5
5
  <versioning>
6
- <latest>2.4.0-canary-20250713-8f814f8</latest>
7
- <release>2.4.0-canary-20250713-8f814f8</release>
6
+ <latest>2.4.1</latest>
7
+ <release>2.4.1</release>
8
8
  <versions>
9
- <version>2.4.0-canary-20250713-8f814f8</version>
9
+ <version>2.4.1</version>
10
10
  </versions>
11
- <lastUpdated>20250713133538</lastUpdated>
11
+ <lastUpdated>20251007085150</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- d6635df55af7d2ba1eff1ad1cabd94cb
1
+ 3bf0867ea34b1589be0c24959316d573
@@ -1 +1 @@
1
- 16df7592a0fa39f97c40e1947d02cfa8c5fb8c31
1
+ f13bfe9b8d3cf52978caabc12be53b92f72505b6
@@ -1 +1 @@
1
- d67ddea608f829dca4e700dbe6b0625c8628f00983a9b7a19c7442dbff6a10c4
1
+ 58564d00a5a0d289bd3f44cf9cd1a9750b31f1204916043f7e41cced499e86fa
@@ -1 +1 @@
1
- a8514f3b91eb7d052579211711b676e5889e0611caf3e5316355bdbe6d108236854ae7a4a5d52c90bf9e1e4d1f160fb64b832c37ff28a945156366485b3dd0cf
1
+ d7553b210369f012367b053b33ee87129d5627e1b230e2d714b157d5528c49fb7f7d2622be7dba82b96fe01b81420d0ec7a24ab1c46f02a3833cabe4061ee469
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "expo-image",
3
3
  "title": "Expo Image",
4
- "version": "2.4.0-canary-20250713-8f814f8",
4
+ "version": "2.4.1",
5
5
  "description": "A cross-platform, performant image component for React Native and Expo with Web support",
6
6
  "main": "src/index.ts",
7
7
  "types": "build/index.d.ts",
@@ -29,10 +29,10 @@
29
29
  "license": "MIT",
30
30
  "dependencies": {},
31
31
  "devDependencies": {
32
- "expo-module-scripts": "4.1.10-canary-20250713-8f814f8"
32
+ "expo-module-scripts": "^4.1.10"
33
33
  },
34
34
  "peerDependencies": {
35
- "expo": "54.0.0-canary-20250713-8f814f8",
35
+ "expo": "*",
36
36
  "react": "*",
37
37
  "react-native": "*",
38
38
  "react-native-web": "*"
@@ -44,5 +44,6 @@
44
44
  },
45
45
  "jest": {
46
46
  "preset": "expo-module-scripts"
47
- }
47
+ },
48
+ "gitHead": "07dc8c3512389818858c541a2d6143815ea3f9fb"
48
49
  }
@@ -75,7 +75,6 @@ export default function ExpoImage({
75
75
  style,
76
76
  nativeViewRef,
77
77
  accessibilityLabel,
78
- alt,
79
78
  tintColor,
80
79
  containerViewRef,
81
80
  ...props
@@ -115,7 +114,7 @@ export default function ExpoImage({
115
114
  contentPosition={{ left: '50%', top: '50%' }}
116
115
  hashPlaceholderContentPosition={contentPosition}
117
116
  hashPlaceholderStyle={imageHashStyle}
118
- accessibilityLabel={accessibilityLabel ?? alt}
117
+ accessibilityLabel={accessibilityLabel}
119
118
  cachePolicy={cachePolicy}
120
119
  priority={priority}
121
120
  tintColor={tintColor}
package/src/Image.tsx CHANGED
@@ -129,18 +129,17 @@ export class Image extends React.PureComponent<ImageProps> {
129
129
 
130
130
  /**
131
131
  * Asynchronously generates a [Blurhash](https://blurha.sh) from an image.
132
- * @param source - The image source, either a URL (string) or an ImageRef
132
+ * @param url - The URL of the image to generate a blurhash from.
133
133
  * @param numberOfComponents - The number of components to encode the blurhash with.
134
134
  * Must be between 1 and 9. Defaults to `[4, 3]`.
135
- * @platform android
136
135
  * @platform ios
137
136
  * @return A promise resolving to the blurhash string.
138
137
  */
139
138
  static async generateBlurhashAsync(
140
- source: string | ImageRef,
139
+ url: string,
141
140
  numberOfComponents: [number, number] | { width: number; height: number }
142
141
  ): Promise<string | null> {
143
- return ImageModule.generateBlurhashAsync(source, numberOfComponents);
142
+ return await ImageModule.generateBlurhashAsync(url, numberOfComponents);
144
143
  }
145
144
 
146
145
  /**
@@ -164,7 +164,7 @@ export interface ImageProps extends Omit<ViewProps, 'style' | 'children'> {
164
164
 
165
165
  /**
166
166
  * A color used to tint template images (a bitmap image where only the opacity matters).
167
- * The color is applied to every non-transparent pixel, causing the image's shape to adopt that color.
167
+ * The color is applied to every non-transparent pixel, causing the images shape to adopt that color.
168
168
  * This effect is not applied to placeholders.
169
169
  * @default null
170
170
  */
@@ -308,13 +308,13 @@ export interface ImageProps extends Omit<ViewProps, 'style' | 'children'> {
308
308
  accessible?: boolean;
309
309
 
310
310
  /**
311
- * The text that's read by the screen reader when the user interacts with the image. Sets the `alt` tag on web which is used for web crawlers and link traversal.
311
+ * The text that's read by the screen reader when the user interacts with the image. Sets the the `alt` tag on web which is used for web crawlers and link traversal.
312
312
  * @default undefined
313
313
  */
314
314
  accessibilityLabel?: string;
315
315
 
316
316
  /**
317
- * The text that's read by the screen reader when the user interacts with the image. Sets the `alt` tag on web which is used for web crawlers and link traversal. Is an alias for `accessibilityLabel`.
317
+ * The text that's read by the screen reader when the user interacts with the image. Sets the the `alt` tag on web which is used for web crawlers and link traversal. Is an alias for `accessibilityLabel`.
318
318
  *
319
319
  * @alias accessibilityLabel
320
320
  * @default undefined
@@ -439,14 +439,10 @@ export type ImageContentPosition =
439
439
  }
440
440
  | ImageContentPositionString;
441
441
 
442
- /**
443
- * It allows you to use an image as a background while rendering other content on top of it.
444
- * It extends all `Image` props but provides separate styling controls for the container and the background image itself.
445
- */
446
442
  export interface ImageBackgroundProps extends Omit<ImageProps, 'style'> {
447
- /** The style of the image container. */
443
+ /** The style of the image container */
448
444
  style?: StyleProp<ViewStyle> | undefined;
449
- /** Style object for the image. */
445
+ /** Style object for the image */
450
446
  imageStyle?: StyleProp<RNImageStyle> | undefined;
451
447
  /** @hidden */
452
448
  children?: React.ReactNode | undefined;
@@ -44,14 +44,7 @@ const ImageWrapper = React.forwardRef(
44
44
  events?.onMount?.forEach((e) => e?.());
45
45
  }, []);
46
46
 
47
- // Use a unique ID for the SVG filter so that multiple <Image> can be used
48
- // on the same page with different tint colors without conflicts.
49
- const tintId = useId()
50
- // Make it safe for use as an SVG ID. SVG IDs are most strict than HTML
51
- // IDs. They must be compliant with https://www.w3.org/TR/xml/#NT-Name.
52
- // React 19 changed useId() to include « and ». These must be removed or
53
- // the SVG filter will not work (e.g. in Safari which enforces the spec).
54
- .replace(/[«»]/g, '_');
47
+ const tintId = useId();
55
48
 
56
49
  // Thumbhash uri always has to start with 'thumbhash:/'
57
50
  const { resolvedSource, isImageHash } = useImageHashes(source);
@@ -1,112 +0,0 @@
1
- package expo.modules.image.blurhash
2
-
3
- import android.graphics.Bitmap
4
- import android.graphics.Color
5
- import kotlin.math.*
6
-
7
- /**
8
- * Rewritten in kotlin from https://github.com/woltapp/blurhash/blob/master/Swift/BlurHashEncode.swift
9
- */
10
- object BlurhashEncoder {
11
- fun encode(image: Bitmap, numberOfComponents: Pair<Int, Int>): String {
12
- val pixels = IntArray(image.width * image.height)
13
- image.getPixels(pixels, 0, image.width, 0, 0, image.width, image.height)
14
-
15
- val factors = calculateBlurFactors(pixels, image.width, image.height, numberOfComponents)
16
-
17
- val dc = factors.first()
18
- val ac = factors.drop(1)
19
- val hashBuilder = StringBuilder()
20
-
21
- encodeFlag(numberOfComponents, hashBuilder)
22
- val maximumValue = encodeMaximumValue(ac, hashBuilder)
23
- hashBuilder.append(encode83(encodeDC(dc), 4))
24
- for (factor in ac) {
25
- hashBuilder.append(encode83(encodeAC(factor, maximumValue), 2))
26
- }
27
-
28
- return hashBuilder.toString()
29
- }
30
-
31
- private fun encodeFlag(numberOfComponents: Pair<Int, Int>, hashBuilder: StringBuilder) {
32
- val sizeFlag = (numberOfComponents.first - 1) + (numberOfComponents.second - 1) * 9
33
- hashBuilder.append(encode83(sizeFlag, 1))
34
- }
35
-
36
- private fun encodeMaximumValue(ac: List<Triple<Float, Float, Float>>, hash: StringBuilder): Float {
37
- val maximumValue: Float
38
- if (ac.isNotEmpty()) {
39
- val actualMaximumValue = ac.maxOf { t -> max(max(abs(t.first), abs(t.second)), abs(t.third)) }
40
- val quantisedMaximumValue = max(0f, min(82f, floor(actualMaximumValue * 166f - 0.5f))).toInt()
41
- maximumValue = (quantisedMaximumValue + 1).toFloat() / 166f
42
- hash.append(encode83(quantisedMaximumValue, 1))
43
- } else {
44
- maximumValue = 1f
45
- hash.append(encode83(0, 1))
46
- }
47
- return maximumValue
48
- }
49
-
50
- private fun calculateBlurFactors(pixels: IntArray, width: Int, height: Int, numberOfComponents: Pair<Int, Int>): List<Triple<Float, Float, Float>> {
51
- val factors = mutableListOf<Triple<Float, Float, Float>>()
52
- for (y in 0 until numberOfComponents.second) {
53
- for (x in 0 until numberOfComponents.first) {
54
- val normalisation = if (x == 0 && y == 0) 1f else 2f
55
- val factor = multiplyBasisFunction(pixels, width, height, x, y, normalisation)
56
- factors.add(factor)
57
- }
58
- }
59
- return factors
60
- }
61
-
62
- private fun encode83(value: Int, length: Int): String {
63
- var result = ""
64
- for (i in 1..length) {
65
- val digit = (value / 83f.pow((length - i).toFloat())) % 83f
66
- result += ENCODE_CHARACTERS[digit.toInt()]
67
- }
68
- return result
69
- }
70
-
71
- private const val ENCODE_CHARACTERS =
72
- "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~"
73
-
74
- private fun encodeDC(value: Triple<Float, Float, Float>): Int {
75
- val roundedR = BlurhashHelpers.linearTosRGB(value.first)
76
- val roundedG = BlurhashHelpers.linearTosRGB(value.second)
77
- val roundedB = BlurhashHelpers.linearTosRGB(value.third)
78
- return (roundedR shl 16) + (roundedG shl 8) + roundedB
79
- }
80
-
81
- private fun encodeAC(value: Triple<Float, Float, Float>, maximumValue: Float): Int {
82
- val quantR = max(0f, min(18f, floor(BlurhashHelpers.signPow(value.first / maximumValue, 0.5f) * 9f + 9.5f)))
83
- val quantG = max(0f, min(18f, floor(BlurhashHelpers.signPow(value.second / maximumValue, 0.5f) * 9f + 9.5f)))
84
- val quantB = max(0f, min(18f, floor(BlurhashHelpers.signPow(value.third / maximumValue, 0.5f) * 9f + 9.5f)))
85
-
86
- return (quantR * 19f * 19f + quantG * 19f + quantB).toInt()
87
- }
88
-
89
- private fun multiplyBasisFunction(pixels: IntArray, width: Int, height: Int, x: Int, y: Int, normalisation: Float): Triple<Float, Float, Float> {
90
- var r = 0f
91
- var g = 0f
92
- var b = 0f
93
-
94
- for (j in 0 until height) {
95
- for (i in 0 until width) {
96
- val basis = normalisation * cos(PI.toFloat() * x * i / width) * cos(PI.toFloat() * y * j / height)
97
-
98
- val pixel = pixels[i + j * width]
99
- val pr = BlurhashHelpers.srgbToLinear(Color.red(pixel))
100
- val pg = BlurhashHelpers.srgbToLinear(Color.green(pixel))
101
- val pb = BlurhashHelpers.srgbToLinear(Color.blue(pixel))
102
-
103
- r += basis * pr
104
- g += basis * pg
105
- b += basis * pb
106
- }
107
- }
108
-
109
- val scale = 1f / (width * height)
110
- return Triple(r * scale, g * scale, b * scale)
111
- }
112
- }
@@ -1,38 +0,0 @@
1
- package expo.modules.image.blurhash
2
-
3
- import android.graphics.Bitmap
4
- import kotlin.math.*
5
-
6
- object BlurhashHelpers {
7
- fun srgbToLinear(colorEnc: Int): Float {
8
- val v = colorEnc / 255f
9
- return if (v <= 0.04045f) {
10
- (v / 12.92f)
11
- } else {
12
- ((v + 0.055f) / 1.055f).pow(2.4f)
13
- }
14
- }
15
-
16
- fun linearTosRGB(value: Float): Int {
17
- val v = max(0f, min(1f, value))
18
- return if (v <= 0.0031308) {
19
- (v * 12.92 * 255 + 0.5).toInt()
20
- } else {
21
- (1.055 * (v.pow(1f / 2.4f) - 0.055) * 255 + 0.5).toInt()
22
- }
23
- }
24
-
25
- fun signPow(value: Float, exp: Float): Float {
26
- return abs(value).pow(exp) * sign(value)
27
- }
28
-
29
- fun getBitsPerPixel(bitmap: Bitmap): Int {
30
- return when (bitmap.config) {
31
- Bitmap.Config.ARGB_8888 -> 32
32
- Bitmap.Config.RGB_565 -> 16
33
- Bitmap.Config.ALPHA_8 -> 8
34
- Bitmap.Config.ARGB_4444 -> 16
35
- else -> 0
36
- }
37
- }
38
- }
@@ -1 +0,0 @@
1
- 5088775ebe8dbdd3636ae44627d45f466d3b26af289ccd64cc7f59a1db50045ec4c246dfacdfa80fdedd21b09f837215dd2f0843c8915c10afe74400ec3e626c
@@ -1 +0,0 @@
1
- 28459572fbb29787a5b5eaab8cbec8d65ebcb8b1bff80d4b41020b76188714dc
@@ -1 +0,0 @@
1
- 5928b97432f974641d14f99976ddd03c1933731a6dc215222f3635e8fd3a93fc807eb2068ac61b5618ade31e881c73cba403dec7737c0ad5ea15b23e146c9b87
@@ -1 +0,0 @@
1
- 0c24d72091a2260318e8f0634b73a786a68edcc3efa686ed3a9756740e2cf897073c54071530268629ab1f28eb461941a36303ed0ba4db5f6df5fba0cbf82fec
@@ -1 +0,0 @@
1
- 19e4200b968e5ea875ddfc5e6052016998164c079fe546219ac4c1694c32dad5
@@ -1 +0,0 @@
1
- fbbb81d82cacda91b017192e2a95b7d6aae669ec1e6609d211d7ac571a74556e58e81ae5e626ea2ced1ce982dc42d9e76c797135572bcb06d282ef3e3e628a0b