react-native-nitro-image-pipeline 0.3.2 → 0.3.3

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.
@@ -65,12 +65,18 @@ class HybridNitroImagePipeline: HybridNitroImagePipelineSpec {
65
65
  default: []
66
66
  }
67
67
 
68
+ var processors: [any ImageProcessing] = []
69
+ if let blur = options?.blur, blur > 0 {
70
+ processors.append(.gaussianBlur(radius: Int(blur)))
71
+ }
72
+ if let cornerRadius = options?.cornerRadius, cornerRadius > 0 {
73
+ processors.append(.roundedCorners(radius: cornerRadius))
74
+ }
75
+
68
76
  let imgRequest = ImageRequest(
69
77
  url: URL(string: url),
70
- processors: [
71
- .gaussianBlur(radius: Int(options?.blur ?? 0)),
72
- .roundedCorners(radius: options?.cornerRadius ?? 0)
73
- ], options: cacheOptions
78
+ processors: processors,
79
+ options: cacheOptions
74
80
  )
75
81
 
76
82
  let image = try await ImagePipeline.shared.image(for: imgRequest)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-nitro-image-pipeline",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "High-performance image loading, caching, and processing for React Native, built with Nitro Modules",
5
5
  "main": "./lib/commonjs/index.js",
6
6
  "module": "./lib/module/index.js",