Skip to content

Commit 1b22ee5

Browse files
committed
Update the readme about the progressive animation decoding
1 parent e4af4b8 commit 1b22ee5

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ SDWebImageDownloader.shared.setValue("image/webp,image/*,*/*;q=0.8", forHTTPHead
9191
+ Objective-C
9292

9393
```objective-c
94-
// WebP image loading
95-
UIImageView *imageView;
94+
// WebP online image loading
9695
NSURL *webpURL;
96+
UIImageView *imageView;
9797
[imageView sd_setImageWithURL:webpURL];
9898
```
9999
@@ -106,6 +106,28 @@ let imageView: UIImageView
106106
imageView.sd_setImage(with: webpURL)
107107
```
108108

109+
### Progressive Animation Loading (0.5.0+)
110+
111+
+ Objective-C
112+
113+
```objective-c
114+
// WebP progressive loading for animated image
115+
NSURL *webpURL;
116+
SDAnimatedImageView *imageView;
117+
imageView.shouldIncrementalLoad = YES;
118+
[imageView sd_setImageWithURL:webpURL placeholderImage:nil options:SDWebImageProgressiveLoad];
119+
```
120+
121+
+ Swift
122+
123+
```swift
124+
// WebP progressive loading for animated image
125+
let webpURL: URL
126+
let imageView: SDAnimatedImageView
127+
imageView.shouldIncrementalLoad = true
128+
imageView.sd_setImage(with: webpURL, placeholderImage: nil, options: [.progressiveLoad])
129+
```
130+
109131
### Decoding
110132

111133
+ Objective-C
@@ -124,7 +146,7 @@ let webpData: Data
124146
let image = SDImageWebPCoder.shared.decodedImage(with: data, options: nil)
125147
```
126148

127-
### Thumbnail Decoding
149+
### Thumbnail Decoding (0.4.0+)
128150

129151
+ Objective-C
130152

0 commit comments

Comments
 (0)