Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
flutter_plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林生雨
flutter_plugin
Commits
e9817811
Commit
e9817811
authored
Jan 10, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
m
parent
2968d778
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
workspace.xml
.idea/workspace.xml
+0
-0
GengmeiFlutterPlugin.m
ios/Classes/GengmeiFlutterPlugin.m
+13
-1
No files found.
.idea/workspace.xml
View file @
e9817811
This diff is collapsed.
Click to expand it.
ios/Classes/GengmeiFlutterPlugin.m
View file @
e9817811
...
...
@@ -526,7 +526,19 @@ PHImageRequestOptions *baseImageRequestOption;
PHAsset
*
assets
=
self
.
scanMap
[
path
];
@autoreleasepool
{
[[
PHImageManager
defaultManager
]
requestImageDataForAsset
:
assets
options
:
baseImageRequestOption
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
)]];
NSData
*
imageDataW
=
nil
;
if
([
dataUTI
isEqualToString
:
@"public.heif"
]
||
[
dataUTI
isEqualToString
:
@"public.heic"
])
{
CIImage
*
ciImage
=
[
CIImage
imageWithData
:
imageData
];
CIContext
*
context
=
[
CIContext
context
];
NSData
*
jpgData
=
[
context
JPEGRepresentationOfImage
:
ciImage
colorSpace
:
ciImage
.
colorSpace
options
:
@{}];
imageDataW
=
jpgData
;
}
else
{
imageDataW
=
imageData
;
}
// if ([imageDataW length] / (1024 * 1024) > 3.0) {
// imageDataW = [[UIImage imageWithData: imageDataW] c]; //图片大于3M压缩操作,可不调用此方法
// }
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultTemp
]
:
[
FlutterStandardTypedData
typedDataWithBytes
:
UIImageJPEGRepresentation
([
UIImage
imageWithData
:
imageDataW
],
1
.
0
)]];
}];
}
}
else
if
([[
self
.
takePhotoMap
allKeys
]
containsObject
:
path
]){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment