Commit 80edf993 authored by 林生雨's avatar 林生雨

w

parent a8b9ea3c
......@@ -82,7 +82,7 @@
<file pinned="false" current-in-tab="$ENABLE_FLUTTER_DESKTOP$">
<entry file="file://$PROJECT_DIR$/lib/ScanImagePlugn.dart">
<provider selected="$ENABLE_FLUTTER_DESKTOP$" editor-type-id="text-editor">
<state relative-caret-position="207">
<state relative-caret-position="235">
<caret line="107" column="14" selection-start-line="107" selection-start-column="14" selection-end-line="107" selection-end-column="14" />
<folding>
<element signature="e#45#62#0" expanded="$ENABLE_FLUTTER_DESKTOP$" />
......@@ -305,9 +305,9 @@
<window_info anchor="bottom" id="Run" order="1" weight="0.49861878" />
<window_info anchor="bottom" id="TODO" order="2" />
<window_info anchor="bottom" id="Android Profiler" order="3" show_stripe_button="false" />
<window_info active="$ENABLE_FLUTTER_DESKTOP$" anchor="bottom" id="Logcat" order="4" visible="$ENABLE_FLUTTER_DESKTOP$" weight="0.42837274" />
<window_info anchor="bottom" id="Logcat" order="4" weight="0.42837274" />
<window_info anchor="bottom" id="Debug" order="5" weight="0.32962447" />
<window_info anchor="bottom" id="Terminal" order="6" weight="0.38942978" />
<window_info active="$ENABLE_FLUTTER_DESKTOP$" anchor="bottom" id="Terminal" order="6" visible="$ENABLE_FLUTTER_DESKTOP$" weight="0.38942978" />
<window_info anchor="bottom" id="Event Log" order="7" side_tool="$ENABLE_FLUTTER_DESKTOP$" />
<window_info anchor="bottom" id="Flutter Performance" order="8" side_tool="$ENABLE_FLUTTER_DESKTOP$" />
<window_info anchor="bottom" id="Version Control" order="9" />
......@@ -628,7 +628,7 @@
</entry>
<entry file="file://$PROJECT_DIR$/lib/ScanImagePlugn.dart">
<provider selected="$ENABLE_FLUTTER_DESKTOP$" editor-type-id="text-editor">
<state relative-caret-position="207">
<state relative-caret-position="235">
<caret line="107" column="14" selection-start-line="107" selection-start-column="14" selection-end-line="107" selection-end-column="14" />
<folding>
<element signature="e#45#62#0" expanded="$ENABLE_FLUTTER_DESKTOP$" />
......
......@@ -520,16 +520,16 @@ NSString *cacheDirectory;
imageRequestOption.deliveryMode=PHImageRequestOptionsDeliveryModeHighQualityFormat;
imageRequestOption.resizeMode=PHImageRequestOptionsResizeModeFast;
imageRequestOption.version=PHImageRequestOptionsVersionUnadjusted;
[[PHImageManager defaultManager] requestImageDataForAsset:assets options:imageRequestOption resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
@autoreleasepool{
[[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTemp] :[FlutterStandardTypedData typedDataWithBytes:imageData]];
}
}];
@autoreleasepool{
[[PHImageManager defaultManager] requestImageDataForAsset:assets options:imageRequestOption resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
[[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTemp] :[FlutterStandardTypedData typedDataWithBytes:UIImageJPEGRepresentation([UIImage imageWithData:imageData], 1.0)]];
}];
}
}else if ([[self.takePhotoMap allKeys] containsObject:path]){
@autoreleasepool{
NSString* realPath=self.takePhotoMap[path];
NSData *data = [NSData dataWithContentsOfFile:realPath];
[[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTemp] :[FlutterStandardTypedData typedDataWithBytes:data]];
[[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTemp] :data];
}
}else{
[[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTemp] :nil];
......
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