|
@@ -8,11 +8,9 @@ |
|
@@ -8,11 +8,9 @@ |
8
|
|
8
|
|
9
|
#import "SDWebImageDownloader.h"
|
9
|
#import "SDWebImageDownloader.h"
|
10
|
|
10
|
|
11
|
-#ifdef ENABLE_SDWEBIMAGE_DECODER
|
|
|
12
|
#import "SDWebImageDecoder.h"
|
11
|
#import "SDWebImageDecoder.h"
|
13
|
@interface SDWebImageDownloader (ImageDecoder) <SDWebImageDecoderDelegate>
|
12
|
@interface SDWebImageDownloader (ImageDecoder) <SDWebImageDecoderDelegate>
|
14
|
@end
|
13
|
@end
|
15
|
-#endif
|
|
|
16
|
|
14
|
|
17
|
NSString *const SDWebImageDownloadStartNotification = @"SDWebImageDownloadStartNotification";
|
15
|
NSString *const SDWebImageDownloadStartNotification = @"SDWebImageDownloadStartNotification";
|
18
|
NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNotification";
|
16
|
NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNotification";
|
|
@@ -126,12 +124,7 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot |
|
@@ -126,12 +124,7 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot |
126
|
if ([delegate respondsToSelector:@selector(imageDownloader:didFinishWithImage:)])
|
124
|
if ([delegate respondsToSelector:@selector(imageDownloader:didFinishWithImage:)])
|
127
|
{
|
125
|
{
|
128
|
UIImage *image = SDScaledImageForPath(url.absoluteString, imageData);
|
126
|
UIImage *image = SDScaledImageForPath(url.absoluteString, imageData);
|
129
|
-
|
|
|
130
|
-#ifdef ENABLE_SDWEBIMAGE_DECODER
|
|
|
131
|
[[SDWebImageDecoder sharedImageDecoder] decodeImage:image withDelegate:self userInfo:nil];
|
127
|
[[SDWebImageDecoder sharedImageDecoder] decodeImage:image withDelegate:self userInfo:nil];
|
132
|
-#else
|
|
|
133
|
- [delegate performSelector:@selector(imageDownloader:didFinishWithImage:) withObject:self withObject:image];
|
|
|
134
|
-#endif
|
|
|
135
|
SDWIRelease(image)
|
128
|
SDWIRelease(image)
|
136
|
}
|
129
|
}
|
137
|
}
|
130
|
}
|
|
@@ -151,12 +144,10 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot |
|
@@ -151,12 +144,10 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot |
151
|
|
144
|
|
152
|
#pragma mark SDWebImageDecoderDelegate
|
145
|
#pragma mark SDWebImageDecoderDelegate
|
153
|
|
146
|
|
154
|
-#ifdef ENABLE_SDWEBIMAGE_DECODER
|
|
|
155
|
- (void)imageDecoder:(SDWebImageDecoder *)decoder didFinishDecodingImage:(UIImage *)image userInfo:(NSDictionary *)userInfo
|
147
|
- (void)imageDecoder:(SDWebImageDecoder *)decoder didFinishDecodingImage:(UIImage *)image userInfo:(NSDictionary *)userInfo
|
156
|
{
|
148
|
{
|
157
|
[delegate performSelector:@selector(imageDownloader:didFinishWithImage:) withObject:self withObject:image];
|
149
|
[delegate performSelector:@selector(imageDownloader:didFinishWithImage:) withObject:self withObject:image];
|
158
|
}
|
150
|
}
|
159
|
-#endif
|
|
|
160
|
|
151
|
|
161
|
#pragma mark NSObject
|
152
|
#pragma mark NSObject
|
162
|
|
153
|
|