File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,26 @@ let webpData: Data
124
124
let image = SDImageWebPCoder.shared.decodedImage(with: data, options: nil)
125
125
```
126
126
127
+ ### Thumbnail Decoding
128
+
129
+ + Objective-C
130
+
131
+ ``` objective-c
132
+ // WebP thumbnail image decoding
133
+ NSData *webpData;
134
+ CGSize thumbnailSize = CGSizeMake(300 , 300 );
135
+ UIImage *thumbnailImage = [[SDImageWebPCoder sharedCoder ] decodedImageWithData: webpData options:@{SDImageCoderDecodeThumbnailPixelSize : @(thumbnailSize}] ;
136
+ ```
137
+
138
+ + Swift
139
+
140
+ ```swift
141
+ // WebP thumbnail image decoding
142
+ let webpData: Data
143
+ let thumbnailSize = CGSize(width: 300, height: 300)
144
+ let image = SDImageWebPCoder.shared.decodedImage(with: data, options: [.decodeThumbnailPixelSize: thumbnailSize])
145
+ ```
146
+
127
147
### Encoding
128
148
129
149
+ Objective-c
You can’t perform that action at this time.
0 commit comments