react-native-fast-image 8.27.4 → 8.28.0

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.
package/README.md CHANGED
@@ -276,7 +276,7 @@ Changing it restarts the animation.
276
276
  How the image is filtered when it's drawn smaller or larger than its size (like CSS's `image-rendering`):
277
277
 
278
278
  - `'auto'` **(Default)** - The platform's usual filtering.
279
- - `'smooth'` - iOS only. Keeps a large image drawn much smaller than its size (e.g. a big photo as a thumbnail, or fine lines and text) from looking jagged or noisy. **It uses more memory:** the image is also kept at smaller sizes for drawing, about a third more than the decoded image. On Android it's the same as `'auto'` (images are already decoded at about the view's size there).
279
+ - `'smooth'` - iOS only. Keeps a large image drawn much smaller than its size (e.g. a big photo as a thumbnail, or fine lines and text) from looking jagged or noisy. Such an image is already decoded at about the view's size by default (see `downsample`), so this is for images shown at less than half their size with `downsample={false}`, or a little smaller than their size. **It uses more memory:** the image is also kept at smaller sizes for drawing, about a third more than the decoded image. On Android it's the same as `'auto'` (images are always decoded at about the view's size there).
280
280
  - `'pixelated'` - Sharp pixels, without smoothing, e.g. for pixel art drawn larger than its size. On Android, animated images are still smoothed.
281
281
 
282
282
  ---
@@ -312,9 +312,12 @@ Downloads, local files (`file://`, `content://`) and bundled images (`require()`
312
312
 
313
313
  iOS only. Decodes a large image at about the size it's shown at, instead of at full size, so it takes much less memory.
314
314
 
315
- Use it when you show images much larger than their views and can't get them at the right size, e.g. user uploads or other people's URLs in a list. If you control the images, serve them at the size they're shown instead (resized on your server or by an image CDN), which also saves bandwidth.
315
+ - `true` **(Default)** - An image at least twice the size its view needs is decoded at about the view's size. If the view grows, the image is decoded again for its new size (from the disk cache).
316
+ - `false` - Images are decoded at full size, e.g. for an image that's zoomed in on with a transform (a pinch-to-zoom viewer), which would otherwise show the smaller copy enlarged.
316
317
 
317
- Decoding a smaller copy can take a little longer, so use it where the memory matters. Needs SDWebImage 5.19.7 or later. Photo library images are always decoded this way. On Android images are already decoded at about the view's size.
318
+ It doesn't change `onLoad`'s width and height (the image's own size) or the cached file. Needs SDWebImage 5.19.7 or later: before 5.19 images are decoded at full size, and 5.19.0 to 5.19.6 show photos stored sideways with an EXIF orientation (most phone photos) sideways. Photo library images are always decoded this way, and on Android images are always decoded at about the view's size.
319
+
320
+ If you control the images, serve them at the size they're shown (resized on your server or by an image CDN), which also saves bandwidth.
318
321
 
319
322
  ---
320
323
 
package/dist/index.d.ts CHANGED
@@ -161,9 +161,9 @@ export interface FastImageProps extends AccessibilityProps, ViewProps {
161
161
  transition?: boolean | number | Transition | null;
162
162
  /**
163
163
  * iOS only. Decodes a large image at about the size it's shown at, so it
164
- * takes much less memory. For images much larger than their views that
165
- * you can't get at the right size (if you can, resize them on your server
166
- * or with an image CDN instead). See the README.
164
+ * takes much less memory. `true` (default). `false` decodes images at
165
+ * full size, e.g. for an image that's zoomed in on with a transform. See
166
+ * the README.
167
167
  */
168
168
  downsample?: boolean;
169
169
  /**
@@ -88,6 +88,9 @@ static UIImage* FFFBlurredImage(UIImage* image, CGFloat scale, CGFloat radius, B
88
88
  // rather than dimming like the system's controls.
89
89
  self.tintAdjustmentMode = UIViewTintAdjustmentModeNormal;
90
90
  _loopCount = -1;
91
+ // Images are decoded at about the size they're shown at unless
92
+ // downsample is false, as on Android.
93
+ _downsample = YES;
91
94
  return self;
92
95
  }
93
96
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-fast-image",
3
- "version": "8.27.4",
3
+ "version": "8.28.0",
4
4
  "description": "FastImage, performant React Native image component.",
5
5
  "keywords": [
6
6
  "cache",