Skip to content

Commit

Permalink
Bumped version to 0.6.0
Browse files Browse the repository at this point in the history
Update the README
  • Loading branch information
dreampiggy committed Apr 7, 2020
1 parent 793fcad commit 92e55d4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ let image = SDImageWebPCoder.shared.decodedImage(with: data, options: [.decodeTh
// WebP image encoding
UIImage *image;
NSData *webpData = [[SDImageWebPCoder sharedCoder] encodedDataWithImage:image format:SDImageFormatWebP options:nil];
// Encode Quality
NSData *lossyWebpData = [[SDImageWebPCoder sharedCoder] encodedDataWithImage:image format:SDImageFormatWebP options:@{SDImageCoderEncodeCompressionQuality : @(0.1)}]; // [0, 1] compression quality
NSData *limitedWebpData = [[SDImageWebPCoder sharedCoder] encodedDataWithImage:image format:SDImageFormatWebP options:@{SDImageCoderEncodeMaxFileSize : @(1024 * 10)}]; // v0.6.0 feature, limit output file size <= 10KB
```
+ Swift
Expand All @@ -183,15 +186,17 @@ NSData *webpData = [[SDImageWebPCoder sharedCoder] encodedDataWithImage:image fo
// WebP image encoding
let image: UIImage
let webpData = SDImageWebPCoder.shared.encodedData(with: image, format: .webP, options: nil)
let lossyWebpData = SDImageWebPCoder.shared.encodedData(with: image, format: .webP, options: [.encodeCompressionQuality: 0.1]) // [0, 1] compression quality
let limitedWebpData = SDImageWebPCoder.shared.encodedData(with: image, format: .webP, options: [.encodeMaxFileSize: 1024 * 10]) // v0.6.0 feature, limit output file size <= 10KB
```

See more documentation in [SDWebImage Wiki - Coders](https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#custom-coder-420)

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.
To run the example project, clone the repo, and run `pod install` from the root directory first. Then open `SDWebImageWebPCoder.xcworkspace`.

This is a demo to show how to use `WebP` and animated `WebP` images via `SDWebImage`.
This is a demo to show how to use `WebP` and animated `WebP` images via `SDWebImageWebPCoderExample` target.

## Screenshot

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.5.0'
s.version = '0.6.0'
s.summary = 'WebP decoder/encoder for SDWebImage coder plugin.'

s.description = <<-DESC
Expand Down
4 changes: 2 additions & 2 deletions SDWebImageWebPCoder/Module/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.5.0</string>
<string>0.6.0</string>
<key>CFBundleVersion</key>
<string>0.5.0</string>
<string>0.6.0</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
Expand Down

0 comments on commit 92e55d4

Please sign in to comment.