Skip to content

Commit

Permalink
Bumped version to 0.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dreampiggy committed Jun 14, 2023
1 parent f4c0907 commit 9348ad3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"repositoryURL": "https://github.com/SDWebImage/SDWebImage.git",
"state": {
"branch": null,
"revision": "fb50c1d20f24db5322b2f8f379de3618f75fe08e",
"version": "5.15.5"
"revision": "c51ba84499268ea3020e6aee9e229c0f56b9d924",
"version": "5.16.0"
}
}
]
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,28 @@ let thumbnailSize = CGSize(width: 300, height: 300)
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

+ Objective-c
Expand Down
2 changes: 1 addition & 1 deletion SDWebImageWebPCoder.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'SDWebImageWebPCoder'
s.version = '0.11.0'
s.version = '0.12.0'
s.summary = 'WebP decoder/encoder for SDWebImage coder plugin.'

s.description = <<-DESC
Expand Down

0 comments on commit 9348ad3

Please sign in to comment.