Update the readme about the progressive animation decoding
This commit is contained in:
parent
e4af4b805e
commit
1b22ee5e56
28
README.md
28
README.md
|
@ -91,9 +91,9 @@ SDWebImageDownloader.shared.setValue("image/webp,image/*,*/*;q=0.8", forHTTPHead
|
||||||
+ Objective-C
|
+ Objective-C
|
||||||
|
|
||||||
```objective-c
|
```objective-c
|
||||||
// WebP image loading
|
// WebP online image loading
|
||||||
UIImageView *imageView;
|
|
||||||
NSURL *webpURL;
|
NSURL *webpURL;
|
||||||
|
UIImageView *imageView;
|
||||||
[imageView sd_setImageWithURL:webpURL];
|
[imageView sd_setImageWithURL:webpURL];
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -106,6 +106,28 @@ let imageView: UIImageView
|
||||||
imageView.sd_setImage(with: webpURL)
|
imageView.sd_setImage(with: webpURL)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Progressive Animation Loading (0.5.0+)
|
||||||
|
|
||||||
|
+ Objective-C
|
||||||
|
|
||||||
|
```objective-c
|
||||||
|
// WebP progressive loading for animated image
|
||||||
|
NSURL *webpURL;
|
||||||
|
SDAnimatedImageView *imageView;
|
||||||
|
imageView.shouldIncrementalLoad = YES;
|
||||||
|
[imageView sd_setImageWithURL:webpURL placeholderImage:nil options:SDWebImageProgressiveLoad];
|
||||||
|
```
|
||||||
|
|
||||||
|
+ Swift
|
||||||
|
|
||||||
|
```swift
|
||||||
|
// WebP progressive loading for animated image
|
||||||
|
let webpURL: URL
|
||||||
|
let imageView: SDAnimatedImageView
|
||||||
|
imageView.shouldIncrementalLoad = true
|
||||||
|
imageView.sd_setImage(with: webpURL, placeholderImage: nil, options: [.progressiveLoad])
|
||||||
|
```
|
||||||
|
|
||||||
### Decoding
|
### Decoding
|
||||||
|
|
||||||
+ Objective-C
|
+ Objective-C
|
||||||
|
@ -124,7 +146,7 @@ let webpData: Data
|
||||||
let image = SDImageWebPCoder.shared.decodedImage(with: data, options: nil)
|
let image = SDImageWebPCoder.shared.decodedImage(with: data, options: nil)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Thumbnail Decoding
|
### Thumbnail Decoding (0.4.0+)
|
||||||
|
|
||||||
+ Objective-C
|
+ Objective-C
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue