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

ww

parent 6244d479
......@@ -196,8 +196,8 @@
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="157" />
<option name="y" value="23" />
<option name="x" value="62" />
<option name="y" value="120" />
<option name="width" value="1440" />
<option name="height" value="812" />
</component>
......
......@@ -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] requestImageForAsset:assets targetSize:temp contentMode:PHImageContentModeDefault options:imageRequestOption resultHandler:^(UIImage * _Nullable res, NSDictionary * _Nullable info) {
dispatch_async(concurrentQueue, ^{
@autoreleasepool{
UIImage * res=[UIImage imageWithData:imageData];
NSData *data = UIImageJPEGRepresentation(res, 0.6) ;
[data writeToFile:tempTake1 atomically:YES];
res=nil;
data=nil;
}
NSMutableDictionary *dict=[[NSMutableDictionary alloc] init];
[dict setObject:path[i] forKey:@"path"];
[dict setObject:tempTake1 forKey:@"realImagePath"];
@synchronized (self) {
self.channelSize++;
[self.channelList addObject:dict];
}
if(self.channelSize==self.channelAllSize){
dispatch_async(dispatch_get_main_queue(), ^{
[[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTemp] :self.channelList];
});
}
});
@autoreleasepool{
UIImage * res=[UIImage imageWithData:imageData];
NSData *data = UIImageJPEGRepresentation(res, 0.6) ;
[data writeToFile:tempTake1 atomically:YES];
res=nil;
data=nil;
}
NSMutableDictionary *dict=[[NSMutableDictionary alloc] init];
[dict setObject:path[i] forKey:@"path"];
[dict setObject:tempTake1 forKey:@"realImagePath"];
@synchronized (self) {
self.channelSize++;
[self.channelList addObject:dict];
}
if(self.channelSize==self.channelAllSize){
[[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTemp] :self.channelList];
}
}];
});
}
......@@ -505,7 +502,7 @@ NSString *cacheDirectory;
}
- (BOOL)removeAllFilesAtPath:(NSString *)path {
NSDirectoryEnumerator *enumerator = [[NSFileManager defaultManager] enumeratorAtPath:path];
BOOL result = YES;
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