Commit 3ef491aa authored by 林生雨's avatar 林生雨

ww

parent 6244d479
...@@ -196,8 +196,8 @@ ...@@ -196,8 +196,8 @@
</option> </option>
</component> </component>
<component name="ProjectFrameBounds" extendedState="6"> <component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="157" /> <option name="x" value="62" />
<option name="y" value="23" /> <option name="y" value="120" />
<option name="width" value="1440" /> <option name="width" value="1440" />
<option name="height" value="812" /> <option name="height" value="812" />
</component> </component>
......
...@@ -315,27 +315,24 @@ NSString *cacheDirectory; ...@@ -315,27 +315,24 @@ NSString *cacheDirectory;
[[PHImageManager defaultManager] requestImageDataForAsset:assets options:imageRequestOption resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) { [[PHImageManager defaultManager] requestImageDataForAsset:assets options:imageRequestOption resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
// [[PHImageManager defaultManager] requestImageForAsset:assets targetSize:temp contentMode:PHImageContentModeDefault options:imageRequestOption resultHandler:^(UIImage * _Nullable res, NSDictionary * _Nullable info) { // [[PHImageManager defaultManager] requestImageForAsset:assets targetSize:temp contentMode:PHImageContentModeDefault options:imageRequestOption resultHandler:^(UIImage * _Nullable res, NSDictionary * _Nullable info) {
dispatch_async(concurrentQueue, ^{ @autoreleasepool{
@autoreleasepool{ UIImage * res=[UIImage imageWithData:imageData];
UIImage * res=[UIImage imageWithData:imageData]; NSData *data = UIImageJPEGRepresentation(res, 0.6) ;
NSData *data = UIImageJPEGRepresentation(res, 0.6) ; [data writeToFile:tempTake1 atomically:YES];
[data writeToFile:tempTake1 atomically:YES]; res=nil;
res=nil; data=nil;
data=nil; }
} NSMutableDictionary *dict=[[NSMutableDictionary alloc] init];
NSMutableDictionary *dict=[[NSMutableDictionary alloc] init]; [dict setObject:path[i] forKey:@"path"];
[dict setObject:path[i] forKey:@"path"]; [dict setObject:tempTake1 forKey:@"realImagePath"];
[dict setObject:tempTake1 forKey:@"realImagePath"]; @synchronized (self) {
@synchronized (self) { self.channelSize++;
self.channelSize++; [self.channelList addObject:dict];
[self.channelList addObject:dict]; }
} if(self.channelSize==self.channelAllSize){
if(self.channelSize==self.channelAllSize){
dispatch_async(dispatch_get_main_queue(), ^{ [[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTemp] :self.channelList];
[[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTemp] :self.channelList]; }
});
}
});
}]; }];
}); });
} }
...@@ -505,7 +502,7 @@ NSString *cacheDirectory; ...@@ -505,7 +502,7 @@ NSString *cacheDirectory;
} }
- (BOOL)removeAllFilesAtPath:(NSString *)path { - (BOOL)removeAllFilesAtPath:(NSString *)path {
NSDirectoryEnumerator *enumerator = [[NSFileManager defaultManager] enumeratorAtPath:path]; NSDirectoryEnumerator *enumerator = [[NSFileManager defaultManager] enumeratorAtPath:path];
BOOL result = YES; BOOL result = YES;
for (NSString *fileName in enumerator) { for (NSString *fileName in enumerator) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment