14 Commits

Author SHA1 Message Date
ibireme 66f20c481f bumping the version to 1.0.2 2016-05-21 01:20:43 +08:00
ibireme bd71dcac5d code format... 2016-04-22 00:35:28 +08:00
Yaoyuan f42422b919 Merge pull request #27 from storix/incorrect-gif-loopcount-bug
Get gif image loop count error
2016-04-22 00:18:19 +08:00
Storix a8e5fc490e Fix incorrectly extracted GIF loop count value 2016-04-21 15:24:13 +03:00
ibireme 79e4918851 add some documentation and debug log for WebP 2016-04-21 11:06:32 +08:00
ibireme e29bc97813 avoid duplicate symbol error when use -all_load link flag: https://github.com/ibireme/YYImage/issues/24 2016-04-15 11:13:41 +08:00
ibireme 66e6dad4fe Do not let Xcode compressed APNG files. 2016-03-25 11:30:44 +08:00
ibireme e6fa4e47fa bumping the version to 1.0.1 2016-03-16 01:17:02 +08:00
ibireme 8adb9893ee destroy pthread_mutex on dealloc 2016-03-02 19:09:08 +08:00
Yaoyuan e2051d8e9e Merge pull request #15 from nivl4/docs/fix-tiny-pragma-mark-typo
fix typo
2016-03-01 10:02:57 +08:00
nivl4 8e20c717a0 docs: fix pragma mark typo 2016-03-01 09:51:57 +08:00
ibireme 4b84501b8e 1.0 Release 2016-02-27 23:03:27 +08:00
ibireme 010558ba30 updated readme 2016-02-27 21:42:24 +08:00
ibireme 5d38d34b18 update podspec 2016-02-27 19:28:29 +08:00
8 changed files with 49 additions and 33 deletions
@@ -442,6 +442,7 @@
LIBRARY_SEARCH_PATHS = "";
PRODUCT_BUNDLE_IDENTIFIER = com.ibireme.YYImageDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_PNG_TEXT = NO;
};
name = Debug;
};
@@ -457,6 +458,7 @@
LIBRARY_SEARCH_PATHS = "";
PRODUCT_BUNDLE_IDENTIFIER = com.ibireme.YYImageDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_PNG_TEXT = NO;
};
name = Release;
};
+1 -1
View File
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.9.4</string>
<string>1.0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
+20 -20
View File
@@ -19,9 +19,9 @@ Features
- Display/encode/decode still image with these types:<br/>&nbsp;&nbsp;&nbsp;&nbsp;WebP, PNG, GIF, JPEG, JP2, TIFF, BMP, ICO, ICNS.
- Baseline/progressive/interlaced image decode with these types:<br/>&nbsp;&nbsp;&nbsp;&nbsp;PNG, GIF, JPEG, BMP.
- Display frame based image animation and sprite sheet animation.
- Dynamic memory buffer for lower memory usage.
- Fully compatible with UIImage and UIImageView class.
- Extendable protocol for custom image animation.
- Dynamic memory buffer for lower memory usage.
- Fully documented.
Usage
@@ -133,17 +133,17 @@ Installation
### CocoaPods
1. Update cocoapods to the latest version.
1. Add `pod "YYImage"` to your Podfile.
2. Run `pod install` or `pod update`.
3. Import \<YYImage/YYImage.h\>
2. Add `pod 'YYImage'` to your Podfile.
3. Run `pod install` or `pod update`.
4. Import \<YYImage/YYImage.h\>.
5. Notice: it doesn't include WebP subspec by default, if you want to support WebP format, you may add `pod 'YYImage/WebP'` to your Podfile. You may call `YYImageWebPAvailable()` to check whether the WebP subspec is installed correctly.
### Carthage
1. Add `github "ibireme/YYImage"` to your Cartfile.
2. Run `carthage update --platform ios` and add the framework to your project.
3. Import \<YYImage/YYImage.h\>
4. Notice: carthage framework doesn't include webp component, if you want to support webp, use cocoapods or install manually.
3. Import \<YYImage/YYImage.h\>.
4. Notice: carthage framework doesn't include WebP component, if you want to support WebP format, use CocoaPods or install manually.
### Manually
@@ -158,8 +158,8 @@ Installation
* Accelerate
* MobileCoreServices
* libz
4. Add `Vendor/WebP.framework`(static library) to your Xcode project if you want to support webp.
5. Import `YYImage.h`.
4. Import `YYImage.h`.
5. Notice: if you want to support WebP format, you may add `Vendor/WebP.framework`(static library) to your Xcode project. You may call `YYImageWebPAvailable()` to check whether the WebP library is installed correctly.
Documentation
@@ -170,7 +170,7 @@ You can also install documentation locally using [appledoc](https://github.com/t
Requirements
==============
This library requires a deployment target of iOS 6.0 or greater.
This library requires `iOS 6.0+` and `Xcode 7.0+`.
License
@@ -197,9 +197,9 @@ YYImage: 功能强大的 iOS 图像框架。<br/>
- 支持以下类型图片的渐进式/逐行扫描/隔行扫描解码:<br/>
&nbsp;&nbsp;&nbsp;&nbsp;PNG, GIF, JPEG, BMP。
- 支持多张图片构成的帧动画播放,支持单张图片的 sprite sheet 动画。
- 高效的动态内存缓存管理,以保证高性能低内存的动画播放。
- 完全兼容 UIImage 和 UIImageView,使用方便。
- 保留可扩展的接口,以支持自定义动画。
- 高效的动态内存缓存管理,以保证高性能低内存的动画播放。
- 每个类和方法都有完善的文档注释。
@@ -313,17 +313,17 @@ YYImage: 功能强大的 iOS 图像框架。<br/>
### CocoaPods
1. 将 cocoapods 更新至最新版本.
1. 在 Podfile 中添加 `pod "YYImage"`
2. 执行 `pod install``pod update`
3. 导入 \<YYImage/YYImage.h\>。
2. 在 Podfile 中添加 `pod 'YYImage'`
3. 执行 `pod install``pod update`
4. 导入 \<YYImage/YYImage.h\>。
5. 注意:pod 配置并没有包含 WebP 组件, 如果你需要支持 WebP,可以在 Podfile 中添加 `pod 'YYImage/WebP'`。你可以调用 `YYImageWebPAvailable()` 来检查一下 WebP 组件是否被正确安装。
### Carthage
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 安装,或者手动安装。
### 手动安装
@@ -338,17 +338,17 @@ YYImage: 功能强大的 iOS 图像框架。<br/>
* Accelerate
* MobileCoreServices
* libz
4. 如果你需要支持 webp,可以将 `Vendor/WebP.framework`(静态库) 加入你的工程
5. 导入 `YYImage.h`
4. 导入 `YYImage.h`
5. 注意:如果你需要支持 WebP,可以将 `Vendor/WebP.framework`(静态库) 加入你的工程。你可以调用 `YYImageWebPAvailable()` 来检查一下 WebP 组件是否被正确安装
文档
==============
你可以在 [CocoaDocs](http://cocoadocs.org/docsets/YYImage/) 查看在线 API 文档,也可以用 [appledoc](https://github.com/tomaz/appledoc) 本地生成文档。
关于
系统要求
==============
该项目最低支持 iOS 6.0。
该项目最低支持 `iOS 6.0``Xcode 7.0`
许可证
BIN
View File
Binary file not shown.
-2
View File
@@ -104,7 +104,6 @@ for PLATFORM in ${PLATFORMS}; do
--disable-shared --enable-static \
--enable-libwebpmux \
--enable-libwebpdemux \
--enable-libwebpdecoder \
--enable-swap-16bit-csp \
CFLAGS="${CFLAGS}"
set +x
@@ -119,7 +118,6 @@ for PLATFORM in ${PLATFORMS}; do
ar x libwebp.a
ar x libwebpmux.a
ar x libwebpdemux.a
ar x libwebpdecoder.a
ar q webp.a *.o
LIBLIST+=" ${ROOTDIR}/lib/webp.a"
+3 -4
View File
@@ -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.4'
s.version = '1.0.2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.authors = { 'ibireme' => 'ibireme@gmail.com' }
s.social_media_url = 'http://blog.ibireme.com'
@@ -13,12 +13,11 @@ Pod::Spec.new do |s|
s.requires_arc = true
s.default_subspec = 'Core'
s.libraries = 'z'
s.frameworks = 'UIKit', 'CoreFoundation', 'QuartzCore', 'AssetsLibrary', 'ImageIO', 'Accelerate', 'MobileCoreServices'
s.subspec 'Core' do |core|
core.source_files = 'YYImage/*.{h,m}'
core.public_header_files = 'YYImage/*.{h}'
core.libraries = 'z'
core.frameworks = 'UIKit', 'CoreFoundation', 'QuartzCore', 'AssetsLibrary', 'ImageIO', 'Accelerate', 'MobileCoreServices'
end
s.subspec 'WebP' do |webp|
+1 -1
View File
@@ -620,7 +620,7 @@ typedef NS_ENUM(NSUInteger, YYAnimatedImageType) {
_runloopMode = runloopMode.copy;
}
#pragma mark - Overrice NSObject(NSKeyValueObservingCustomization)
#pragma mark - Override NSObject(NSKeyValueObservingCustomization)
+ (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key {
if ([key isEqualToString:@"currentAnimatedImageIndex"]) {
+22 -5
View File
@@ -1530,6 +1530,7 @@ CGImageRef YYCGImageCreateWithWebPData(CFDataRef webpData,
if (_webpSource) WebPDemuxDelete(_webpSource);
#endif
if (_blendCanvas) CFRelease(_blendCanvas);
pthread_mutex_destroy(&_lock);
}
+ (instancetype)decoderWithData:(NSData *)data scale:(CGFloat)scale {
@@ -1835,6 +1836,13 @@ CGImageRef YYCGImageCreateWithWebPData(CFDataRef webpData,
dispatch_semaphore_wait(_framesLock, DISPATCH_TIME_FOREVER);
_frames = frames;
dispatch_semaphore_signal(_framesLock);
#else
static const char *func = __FUNCTION__;
static const int line = __LINE__;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSLog(@"[%s: %d] WebP is not available, check the documentation to see how to install WebP component: https://github.com/ibireme/YYImage#installation", func, line);
});
#endif
}
@@ -1968,13 +1976,16 @@ CGImageRef YYCGImageCreateWithWebPData(CFDataRef webpData,
if (_type == YYImageTypeGIF) { // get gif loop count
CFDictionaryRef properties = CGImageSourceCopyProperties(_source, NULL);
if (properties) {
CFTypeRef loop = CFDictionaryGetValue(properties, kCGImagePropertyGIFLoopCount);
if (loop) CFNumberGetValue(loop, kCFNumberNSIntegerType, &_loopCount);
CFDictionaryRef gif = CFDictionaryGetValue(properties, kCGImagePropertyGIFDictionary);
if (gif) {
CFTypeRef loop = CFDictionaryGetValue(gif, kCGImagePropertyGIFLoopCount);
if (loop) CFNumberGetValue(loop, kCFNumberNSIntegerType, &_loopCount);
}
CFRelease(properties);
}
}
}
/*
ICO, GIF, APNG may contains multi-frame.
*/
@@ -2311,10 +2322,16 @@ CGImageRef YYCGImageCreateWithWebPData(CFDataRef webpData,
}
- (instancetype)initWithType:(YYImageType)type {
if (type == YYImageTypeUnknown || type >= YYImageTypeOther) return nil;
if (type == YYImageTypeUnknown || type >= YYImageTypeOther) {
NSLog(@"[%s: %d] Unsupported image type:%d",__FUNCTION__, __LINE__, (int)type);
return nil;
}
#if !YYIMAGE_WEBP_ENABLED
if (type == YYImageTypeWebP) return nil;
if (type == YYImageTypeWebP) {
NSLog(@"[%s: %d] WebP is not available, check the documentation to see how to install WebP component: https://github.com/ibireme/YYImage#installation", __FUNCTION__, __LINE__);
return nil;
}
#endif
self = [super init];