Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 684394255f | |||
| 9122a8ccd9 | |||
| 19ef4290a9 | |||
| 970838c6c1 | |||
| 77f4318300 | |||
| 0f875c6de9 | |||
| 0f95266e96 | |||
| bdc088abf1 | |||
| 2dd7540f62 | |||
| 91f04aa02b | |||
| 627be90f71 | |||
| a4c5009703 |
@@ -0,0 +1,7 @@
|
||||
language: objective-c
|
||||
osx_image: xcode7
|
||||
xcode_project: Framework/YYImage.xcodeproj
|
||||
xcode_scheme: YYImage
|
||||
|
||||
script:
|
||||
- xctool -project Framework/YYImage.xcodeproj -scheme YYImage build test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
|
||||
@@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.9.0</string>
|
||||
<string>0.9.2</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
||||
@@ -2,9 +2,10 @@ YYImage <a href="#中文介绍">中文介绍</a>
|
||||
==============
|
||||
[](https://raw.githubusercontent.com/ibireme/YYImage/master/LICENSE)
|
||||
[](https://github.com/Carthage/Carthage)
|
||||
[](http://cocoapods.org/?q= YYImage)
|
||||
[](http://cocoapods.org/?q= YYImage)
|
||||
[](https://www.apple.com/nl/ios/)
|
||||
[](http://cocoapods.org/?q= YYImage)
|
||||
[](http://cocoapods.org/?q= YYImage)
|
||||
[](https://www.apple.com/nl/ios/)
|
||||
[](https://travis-ci.org/ibireme/YYImage)
|
||||
|
||||
Image framework for iOS to display/encode/decode animated WebP, APNG, GIF, and more.<br/>
|
||||
(It's a component of [YYKit](https://github.com/ibireme/YYKit))
|
||||
@@ -21,6 +22,7 @@ Features
|
||||
- Fully compatible with UIImage and UIImageView class.
|
||||
- Extendable protocol for custom image animation.
|
||||
- Dynamic memory buffer for lower memory usage.
|
||||
- Fully documented.
|
||||
|
||||
Usage
|
||||
==============
|
||||
@@ -128,7 +130,7 @@ Usage
|
||||
Installation
|
||||
==============
|
||||
|
||||
### Cocoapods
|
||||
### CocoaPods
|
||||
|
||||
1. Update cocoapods to the latest version.
|
||||
1. Add `pod "YYImage"` to your Podfile.
|
||||
@@ -148,21 +150,27 @@ Installation
|
||||
1. Download all the files in the YYImage subdirectory.
|
||||
2. Add the source files to your Xcode project.
|
||||
3. Link with required frameworks:
|
||||
* UIKit.framework
|
||||
* CoreFoundation.framework
|
||||
* QuartzCore.framework
|
||||
* AssetsLibrary.framework
|
||||
* ImageIO.framework
|
||||
* Accelerate.framework
|
||||
* MobileCoreServices.framework
|
||||
* UIKit
|
||||
* CoreFoundation
|
||||
* QuartzCore
|
||||
* AssetsLibrary
|
||||
* ImageIO
|
||||
* Accelerate
|
||||
* MobileCoreServices
|
||||
* libz
|
||||
4. Add `Vendor/WebP.framework`(static library) to your Xcode project if you want to support webp.
|
||||
5. Import `YYImage.h`.
|
||||
|
||||
|
||||
About
|
||||
Documentation
|
||||
==============
|
||||
This library supports iOS 6.0 and later.
|
||||
Full API documentation is available on [CocoaDocs](http://cocoadocs.org/docsets/YYImage/).<br/>
|
||||
You can also install documentation locally using [appledoc](https://github.com/tomaz/appledoc).
|
||||
|
||||
|
||||
Requirements
|
||||
==============
|
||||
This library requires a deployment target of iOS 6.0 or greater.
|
||||
|
||||
|
||||
License
|
||||
@@ -177,6 +185,8 @@ YYImage is provided under the MIT license. See LICENSE file for details.
|
||||
YYImage: 功能强大的 iOS 图像框架。<br/>
|
||||
(该项目是 [YYKit](https://github.com/ibireme/YYKit) 组件之一)
|
||||
|
||||

|
||||
|
||||
特性
|
||||
==============
|
||||
@@ -190,7 +200,7 @@ YYImage: 功能强大的 iOS 图像框架。<br/>
|
||||
- 完全兼容 UIImage 和 UIImageView,使用方便。
|
||||
- 保留可扩展的接口,以支持自定义动画。
|
||||
- 高效的动态内存缓存管理,以保证高性能低内存的动画播放。
|
||||
- 利用 ImageIO 与 Accelerate 实现高性能的图片编码解码。
|
||||
- 每个类和方法都有完善的文档注释。
|
||||
|
||||
|
||||
用法
|
||||
@@ -300,7 +310,7 @@ YYImage: 功能强大的 iOS 图像框架。<br/>
|
||||
安装
|
||||
==============
|
||||
|
||||
### Cocoapods
|
||||
### CocoaPods
|
||||
|
||||
1. 将 cocoapods 更新至最新版本.
|
||||
1. 在 Podfile 中添加 `pod "YYImage"`。
|
||||
@@ -313,24 +323,28 @@ YYImage: 功能强大的 iOS 图像框架。<br/>
|
||||
1. 在 Cartfile 中添加 `github "ibireme/YYImage"`。
|
||||
2. 执行 `carthage update --platform ios` 并将生成的 framework 添加到你的工程。
|
||||
3. 导入 \<YYImage/YYImage.h\>。
|
||||
4. 注意: carthage framework 并没有包含 webp 组件。如果你需要支持 webp,可以用 Cocoapods 安装,或者手动安装。
|
||||
4. 注意: carthage framework 并没有包含 webp 组件。如果你需要支持 webp,可以用 CocoaPods 安装,或者手动安装。
|
||||
|
||||
### 手动安装
|
||||
|
||||
1. 下载 YYImage 文件夹内的所有内容。
|
||||
2. 将 YYModel 内的源文件添加(拖放)到你的工程。
|
||||
3. 链接以下 frameworks:
|
||||
* UIKit.framework
|
||||
* CoreFoundation.framework
|
||||
* QuartzCore.framework
|
||||
* AssetsLibrary.framework
|
||||
* ImageIO.framework
|
||||
* Accelerate.framework
|
||||
* MobileCoreServices.framework
|
||||
* UIKit
|
||||
* CoreFoundation
|
||||
* QuartzCore
|
||||
* AssetsLibrary
|
||||
* ImageIO
|
||||
* Accelerate
|
||||
* MobileCoreServices
|
||||
* libz
|
||||
4. 如果你需要支持 webp,可以将 `Vendor/WebP.framework`(静态库) 加入你的工程。
|
||||
5. 导入 `YYImage.h`。
|
||||
|
||||
文档
|
||||
==============
|
||||
你可以在 [CocoaDocs](http://cocoadocs.org/docsets/YYImage/) 查看在线 API 文档,也可以用 [appledoc](https://github.com/tomaz/appledoc) 本地生成文档。
|
||||
|
||||
|
||||
关于
|
||||
==============
|
||||
@@ -340,3 +354,10 @@ YYImage: 功能强大的 iOS 图像框架。<br/>
|
||||
许可证
|
||||
==============
|
||||
YYModel 使用 MIT 许可证,详情见 LICENSE 文件。
|
||||
|
||||
|
||||
相关链接
|
||||
==============
|
||||
[移动端图片格式调研](http://blog.ibireme.com/2015/11/02/mobile_image_benchmark/)<br/>
|
||||
|
||||
[iOS 处理图片的一些小 Tip](http://blog.ibireme.com/2015/11/02/ios_image_tips/)
|
||||
+4
-4
@@ -72,13 +72,13 @@
|
||||
#define PACKAGE "libwebp"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "http://code.google.com/p/webp/issues"
|
||||
#define PACKAGE_BUGREPORT "https://bugs.chromium.org/p/webp"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "libwebp"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "libwebp 0.4.3"
|
||||
#define PACKAGE_STRING "libwebp 0.4.4"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "libwebp"
|
||||
@@ -87,7 +87,7 @@
|
||||
#define PACKAGE_URL "http://developers.google.com/speed/webp"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "0.4.3"
|
||||
#define PACKAGE_VERSION "0.4.4"
|
||||
|
||||
/* Define to necessary symbol if this constant uses a non-standard name on
|
||||
your system. */
|
||||
@@ -97,7 +97,7 @@
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "0.4.3"
|
||||
#define VERSION "0.4.4"
|
||||
|
||||
/* Enable experimental code */
|
||||
/* #undef WEBP_EXPERIMENTAL_FEATURES */
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,7 +1,7 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'YYImage'
|
||||
s.summary = 'Image framework for iOS to display/encode/decode animated WebP, APNG, GIF, and more.'
|
||||
s.version = '0.9.0'
|
||||
s.version = '0.9.2'
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
s.authors = { 'ibireme' => 'ibireme@gmail.com' }
|
||||
s.social_media_url = 'http://blog.ibireme.com'
|
||||
|
||||
@@ -197,6 +197,13 @@ typedef NS_ENUM(NSUInteger, YYAnimagedImageType) {
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
_runloopMode = NSRunLoopCommonModes;
|
||||
_autoPlayAnimatedImage = YES;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithImage:(UIImage *)image {
|
||||
self = [super init];
|
||||
_runloopMode = NSRunLoopCommonModes;
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ static CGFloat _NSStringPathScale(NSString *string) {
|
||||
|
||||
- (instancetype)initWithData:(NSData *)data scale:(CGFloat)scale {
|
||||
if (data.length == 0) return nil;
|
||||
if (scale <= 0) scale = 1;
|
||||
if (scale <= 0) scale = [UIScreen mainScreen].scale;
|
||||
_preloadedLock = OS_SPINLOCK_INIT;
|
||||
@autoreleasepool {
|
||||
YYImageDecoder *decoder = [YYImageDecoder decoderWithData:data scale:scale];
|
||||
|
||||
Reference in New Issue
Block a user