Merge branch 'master' of https://github.com/SDWebImage/SDWebImage into 5.x
# Conflicts: # CHANGELOG.md # README.md # SDWebImage.podspec # SDWebImage/SDWebImageDownloaderOperation.m # SDWebImage/SDWebImageImageIOCoder.m # SDWebImage/SDWebImageWebPCoder.m # WebImage/Info.plist
This commit is contained in:
commit
d6db67282c
|
@ -10,7 +10,7 @@
|
||||||
* [ ] I have run the tests and they pass
|
* [ ] I have run the tests and they pass
|
||||||
* [ ] I have run the lint and it passes (`pod lib lint`)
|
* [ ] I have run the lint and it passes (`pod lib lint`)
|
||||||
|
|
||||||
This merge request fixes / reffers to the following issues: ...
|
This merge request fixes / refers to the following issues: ...
|
||||||
|
|
||||||
### Pull Request Description
|
### Pull Request Description
|
||||||
|
|
||||||
|
|
16
CHANGELOG.md
16
CHANGELOG.md
|
@ -1,3 +1,19 @@
|
||||||
|
## [5.0.0-beta5 - Customizable SDWebImage, on Jan 31st, 2019](https://github.com/rs/SDWebImage/releases/tag/5.0.0-beta5)
|
||||||
|
See [all tickets marked for the 5.0.0-beta5 release](https://github.com/rs/SDWebImage/milestone/32)
|
||||||
|
|
||||||
|
#### Fixes
|
||||||
|
- Fix encoding options does not works #2602
|
||||||
|
- Remove unnecessary CGImage check when encode first frame #2609
|
||||||
|
|
||||||
|
## [4.4.5 - 4.4 patch, on Jan 31st, 2019](https://github.com/SDWebImage/SDWebImage/releases/tag/4.4.5)
|
||||||
|
See [all tickets marked for the 4.4.5 release](https://github.com/SDWebImage/SDWebImage/milestone/31)
|
||||||
|
|
||||||
|
#### Fixes
|
||||||
|
- Revert the modular framework, try to fix some user's install issue when using SDWebImage in prefix header #2604
|
||||||
|
- Fix wrong decompression scale calculation #2608
|
||||||
|
- Fix shouldDecode check when image format is GIF #2606
|
||||||
|
- Fix modify data pointer if webp image scaled down #2607
|
||||||
|
|
||||||
## [5.0.0-beta4 - Customizable SDWebImage, on Jan 26th, 2019](https://github.com/rs/SDWebImage/releases/tag/5.0.0-beta4)
|
## [5.0.0-beta4 - Customizable SDWebImage, on Jan 26th, 2019](https://github.com/rs/SDWebImage/releases/tag/5.0.0-beta4)
|
||||||
See [all tickets marked for the 5.0.0 release](https://github.com/rs/SDWebImage/milestone/15)
|
See [all tickets marked for the 5.0.0 release](https://github.com/rs/SDWebImage/milestone/15)
|
||||||
|
|
||||||
|
|
21
README.md
21
README.md
|
@ -33,6 +33,7 @@ This library provides an async image downloader with cache support. For convenie
|
||||||
|
|
||||||
- Image formats supported by UIImage (JPEG, PNG, ...), including GIF
|
- Image formats supported by UIImage (JPEG, PNG, ...), including GIF
|
||||||
- WebP format, including animated WebP (use the [SDWebImageWebPCoder](https://github.com/SDWebImage/SDWebImageWebPCoder) project)
|
- WebP format, including animated WebP (use the [SDWebImageWebPCoder](https://github.com/SDWebImage/SDWebImageWebPCoder) project)
|
||||||
|
- Support extendable coder plugins for new image formats. Like APNG, BPG, HFIF, SVG, etc. See all the list in [Image coder plugin List](https://github.com/SDWebImage/SDWebImage/wiki/Coder-Plugin-List)
|
||||||
|
|
||||||
## Additional modules
|
## Additional modules
|
||||||
|
|
||||||
|
@ -58,6 +59,12 @@ As such, we have moved/built new modules to [SDWebImage org](https://github.com/
|
||||||
|
|
||||||
You can use those directly, or create similar components of your own.
|
You can use those directly, or create similar components of your own.
|
||||||
|
|
||||||
|
## Beta version
|
||||||
|
|
||||||
|
SDWebImage's 5.0 version is nearing completion. Which introduce many new features like Animated ImageView and Transformer. We also provide a more modularized design used for advanced user customization.
|
||||||
|
|
||||||
|
You can check the latest [5.x branch](https://github.com/SDWebImage/SDWebImage/tree/5.x) to know about the current status. We'd love you to have a try with the beta version and provide any feedback. If you'd love, check [SDWebImage 5.0 Migration Guide](https://github.com/SDWebImage/SDWebImage/wiki/5.0-Migration-guide) and prepare for the migration.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- iOS 8.0 or later
|
- iOS 8.0 or later
|
||||||
|
@ -142,19 +149,27 @@ platform :ios, '7.0'
|
||||||
pod 'SDWebImage', '~> 4.0'
|
pod 'SDWebImage', '~> 4.0'
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Swift
|
##### Swift and static framework
|
||||||
|
|
||||||
If you are using `Swift`, `Xcode 9+` and `CocoaPods` `1.5.0+`, you only need to set your target to `iOS 8+` if you need static library:
|
Swift project previously have to use `use_frameworks!` to make all Pods into dynamic framework to let CocoaPods works.
|
||||||
|
|
||||||
|
However, start with `CocoaPods 1.5.0+` (with `Xcode 9+`), which supports to build both Objective-C && Swift code into static framework. You can use modular headers to use SDWebImage as static framework, without the need of `use_frameworks!`:
|
||||||
|
|
||||||
```
|
```
|
||||||
platform :ios, '8.0'
|
platform :ios, '8.0'
|
||||||
|
# Uncomment the next line when you want all Pods as static framework
|
||||||
|
# use_modular_headers!
|
||||||
|
pod 'SDWebImage', :modular_headers => true
|
||||||
```
|
```
|
||||||
|
|
||||||
If not, you still need to add `use_frameworks!` to use dynamic framework:
|
See more on [CocoaPods 1.5.0 — Swift Static Libraries](http://blog.cocoapods.org/CocoaPods-1.5.0/)
|
||||||
|
|
||||||
|
If not, you still need to add `use_frameworks!` to use SDWebImage as dynamic framework:
|
||||||
|
|
||||||
```
|
```
|
||||||
platform :ios, '8.0'
|
platform :ios, '8.0'
|
||||||
use_frameworks!
|
use_frameworks!
|
||||||
|
pod 'SDWebImage'
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Subspecs
|
#### Subspecs
|
||||||
|
|
|
@ -24,7 +24,6 @@ Pod::Spec.new do |s|
|
||||||
s.requires_arc = true
|
s.requires_arc = true
|
||||||
s.framework = 'ImageIO'
|
s.framework = 'ImageIO'
|
||||||
s.module_map = 'WebImage/SDWebImage.modulemap'
|
s.module_map = 'WebImage/SDWebImage.modulemap'
|
||||||
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
|
|
||||||
|
|
||||||
s.default_subspec = 'Core'
|
s.default_subspec = 'Core'
|
||||||
|
|
||||||
|
|
|
@ -326,14 +326,14 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
|
||||||
CGSize sourceResolution = CGSizeZero;
|
CGSize sourceResolution = CGSizeZero;
|
||||||
sourceResolution.width = CGImageGetWidth(sourceImageRef);
|
sourceResolution.width = CGImageGetWidth(sourceImageRef);
|
||||||
sourceResolution.height = CGImageGetHeight(sourceImageRef);
|
sourceResolution.height = CGImageGetHeight(sourceImageRef);
|
||||||
float sourceTotalPixels = sourceResolution.width * sourceResolution.height;
|
CGFloat sourceTotalPixels = sourceResolution.width * sourceResolution.height;
|
||||||
// Determine the scale ratio to apply to the input image
|
// Determine the scale ratio to apply to the input image
|
||||||
// that results in an output image of the defined size.
|
// that results in an output image of the defined size.
|
||||||
// see kDestImageSizeMB, and how it relates to destTotalPixels.
|
// see kDestImageSizeMB, and how it relates to destTotalPixels.
|
||||||
float imageScale = destTotalPixels / sourceTotalPixels;
|
CGFloat imageScale = sqrt(destTotalPixels / sourceTotalPixels);
|
||||||
CGSize destResolution = CGSizeZero;
|
CGSize destResolution = CGSizeZero;
|
||||||
destResolution.width = (int)(sourceResolution.width*imageScale);
|
destResolution.width = (int)(sourceResolution.width * imageScale);
|
||||||
destResolution.height = (int)(sourceResolution.height*imageScale);
|
destResolution.height = (int)(sourceResolution.height * imageScale);
|
||||||
|
|
||||||
// device color space
|
// device color space
|
||||||
CGColorSpaceRef colorspaceRef = [self colorSpaceGetDeviceRGB];
|
CGColorSpaceRef colorspaceRef = [self colorSpaceGetDeviceRGB];
|
||||||
|
|
Loading…
Reference in New Issue