Bumped version to 0.12.0
This commit is contained in:
parent
f4c09076d1
commit
9348ad305b
|
@ -15,8 +15,8 @@
|
||||||
"repositoryURL": "https://github.com/SDWebImage/SDWebImage.git",
|
"repositoryURL": "https://github.com/SDWebImage/SDWebImage.git",
|
||||||
"state": {
|
"state": {
|
||||||
"branch": null,
|
"branch": null,
|
||||||
"revision": "fb50c1d20f24db5322b2f8f379de3618f75fe08e",
|
"revision": "c51ba84499268ea3020e6aee9e229c0f56b9d924",
|
||||||
"version": "5.15.5"
|
"version": "5.16.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
22
README.md
22
README.md
|
@ -168,6 +168,28 @@ let thumbnailSize = CGSize(width: 300, height: 300)
|
||||||
let image = SDImageWebPCoder.shared.decodedImage(with: data, options: [.decodeThumbnailPixelSize: thumbnailSize])
|
let image = SDImageWebPCoder.shared.decodedImage(with: data, options: [.decodeThumbnailPixelSize: thumbnailSize])
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Decoding with limit bytes (0.12.0+)
|
||||||
|
|
||||||
|
+ Objective-C
|
||||||
|
|
||||||
|
```objective-c
|
||||||
|
// WebP thumbnail image decoding
|
||||||
|
NSData *webpData;
|
||||||
|
NSUInteger limitBytes = 1024 * 1024; // 1MB
|
||||||
|
UIImage *image = [[SDImageWebPCoder sharedCoder] decodedImageWithData:webpData options:@{SDImageCoderDecodeScaleDownLimitBytes : @(limitBytes)}];
|
||||||
|
// The image pixel buffer is guaranteed to less than 1MB in RAM (may scale down or full size), suitable for large image
|
||||||
|
```
|
||||||
|
|
||||||
|
+ Swift
|
||||||
|
|
||||||
|
```swift
|
||||||
|
// WebP thumbnail image decoding
|
||||||
|
let webpData: Data
|
||||||
|
let limitBytes = 1024 * 1024 // 1MB
|
||||||
|
let image = SDImageWebPCoder.shared.decodedImage(with: data, options: [.decodeScaleDownLimitBytes: limitBytes])
|
||||||
|
// The image pixel buffer is guaranteed to less than 1MB in RAM (may scale down or full size), suitable for large image
|
||||||
|
```
|
||||||
|
|
||||||
### Encoding
|
### Encoding
|
||||||
|
|
||||||
+ Objective-c
|
+ Objective-c
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Pod::Spec.new do |s|
|
Pod::Spec.new do |s|
|
||||||
s.name = 'SDWebImageWebPCoder'
|
s.name = 'SDWebImageWebPCoder'
|
||||||
s.version = '0.11.0'
|
s.version = '0.12.0'
|
||||||
s.summary = 'WebP decoder/encoder for SDWebImage coder plugin.'
|
s.summary = 'WebP decoder/encoder for SDWebImage coder plugin.'
|
||||||
|
|
||||||
s.description = <<-DESC
|
s.description = <<-DESC
|
||||||
|
|
Loading…
Reference in New Issue