diff --git a/README.md b/README.md index d7b1082..70927b9 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,7 @@ NSData *webpData = [[SDImageWebPCoder sharedCoder] encodedDataWithImage:image fo // 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 +NSData *thumbnailWebpData = [[SDImageWebPCoder sharedCoder] encodedDataWithImage:image format:SDImageFormatWebP options:@{SDImageCoderEncodeMaxPixelSize : @(CGSizeMake(200, 200)}]; // v0.6.1 feature, encoding max pixel size ``` + Swift @@ -188,6 +189,7 @@ 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 +let thumbnailWebpData = SDImageWebPCoder.shared.encodedData(with: image, format: .webP, options: [.encodeMaxPixelSize: CGSize(width: 200, height: 200)]) // v0.6.1 feature, encoding max pixel size ``` See more documentation in [SDWebImage Wiki - Coders](https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#custom-coder-420) diff --git a/SDWebImageWebPCoder.podspec b/SDWebImageWebPCoder.podspec index d645726..2ebe423 100644 --- a/SDWebImageWebPCoder.podspec +++ b/SDWebImageWebPCoder.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'SDWebImageWebPCoder' - s.version = '0.6.0' + s.version = '0.6.1' s.summary = 'WebP decoder/encoder for SDWebImage coder plugin.' s.description = <<-DESC diff --git a/SDWebImageWebPCoder/Module/Info.plist b/SDWebImageWebPCoder/Module/Info.plist index 30cf2e7..e0bc952 100644 --- a/SDWebImageWebPCoder/Module/Info.plist +++ b/SDWebImageWebPCoder/Module/Info.plist @@ -15,9 +15,9 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.6.0 + 0.6.1 CFBundleVersion - 0.6.0 + 0.6.1 NSPrincipalClass