-
Notifications
You must be signed in to change notification settings - Fork 120
/
OLImage.h
71 lines (53 loc) · 1.66 KB
/
OLImage.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//
// OLImage.h
// MMT
//
// Created by Diego Torres on 9/1/12.
// Copyright (c) 2012 Onda. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface OLImage : UIImage
///-----------------------
/// @name Image Attributes
///-----------------------
/**
A C array containing the frame durations.
The number of frames is defined by the count of the `images` array property.
*/
@property (nonatomic, readonly) NSTimeInterval *frameDurations;
/**
Total duration of the animated image.
*/
@property (nonatomic, readonly) NSTimeInterval totalDuration;
/**
Number of loops the image can do before it stops
*/
@property (nonatomic, readonly) NSUInteger loopCount;
@end
///----------------------------
/// @name Partial Image Methods
///----------------------------
@interface OLImage (IncrementalData)
/**
Creates and returns an image object with the Incremental Data processed
@param data The image data. This can be partial data or `nil`
@return A new image object with the specified data or partial container if none was provided.
*/
+ (instancetype)imageWithIncrementalData:(NSData *)data;
/**
Update the image instance with new data
@param data The image data. This can be partial data.
This calls `updateWithData:final:` with `NO` as the `finalize` argument.
*/
- (void)updateWithData:(NSData *)data;
/**
Update the image instance with new data
@param data The image data. This can be partial data.
@param finalize `YES` if this the data provided is complete
*/
- (void)updateWithData:(NSData *)data final:(BOOL)finalize;
/**
Whether the instance is a partial or complete image.
*/
@property (nonatomic, readonly, getter = isPartial) BOOL partial;
@end