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
00b2ed0f
Commit
00b2ed0f
authored
Oct 30, 2019
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
1a1871bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
84 deletions
+88
-84
workspace.xml
.idea/workspace.xml
+61
-57
GengmeiFlutterPlugin.m
ios/Classes/GengmeiFlutterPlugin.m
+27
-27
No files found.
.idea/workspace.xml
View file @
00b2ed0f
...
...
@@ -5,7 +5,10 @@
<option
name=
"TOOL_WINDOW_CONFIGURED_FILTER"
value=
"Show only selected application"
/>
</component>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba"
name=
"Default Changelist"
comment=
""
/>
<list
default=
"true"
id=
"5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/workspace.xml"
afterDir=
"false"
/>
</list>
<ignored
path=
"$PROJECT_DIR$/.dart_tool/"
/>
<ignored
path=
"$PROJECT_DIR$/.idea/"
/>
<ignored
path=
"$PROJECT_DIR$/.pub/"
/>
...
...
@@ -27,7 +30,7 @@
<file
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
351
"
>
<state
relative-caret-position=
"
-1495
"
>
<caret
line=
"231"
column=
"11"
selection-start-line=
"231"
selection-start-column=
"11"
selection-end-line=
"231"
selection-end-column=
"11"
/>
<folding>
<element
signature=
"e#46#66#0"
expanded=
"true"
/>
...
...
@@ -39,7 +42,7 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/main.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
403
"
>
<state
relative-caret-position=
"
3036
"
>
<caret
line=
"144"
column=
"53"
selection-start-line=
"144"
selection-start-column=
"53"
selection-end-line=
"144"
selection-end-column=
"53"
/>
<folding>
<element
signature=
"e#0#17#0"
expanded=
"true"
/>
...
...
@@ -51,7 +54,7 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
90
"
>
<state
relative-caret-position=
"1
32
"
>
<caret
line=
"15"
column=
"2"
selection-start-line=
"15"
selection-start-column=
"2"
selection-end-line=
"15"
selection-end-column=
"2"
/>
<folding>
<element
signature=
"e#45#62#0"
expanded=
"true"
/>
...
...
@@ -63,7 +66,7 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/lib/ScanImagePlugn.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
230
"
>
<state
relative-caret-position=
"
836
"
>
<caret
line=
"41"
column=
"1"
selection-start-line=
"41"
selection-start-column=
"1"
selection-end-line=
"41"
selection-end-column=
"1"
/>
</state>
</provider>
...
...
@@ -72,7 +75,7 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
142
"
>
<state
relative-caret-position=
"
440
"
>
<caret
line=
"26"
column=
"41"
selection-start-line=
"26"
selection-start-column=
"41"
selection-end-line=
"26"
selection-end-column=
"41"
/>
<folding>
<element
signature=
"e#0#20#0"
expanded=
"true"
/>
...
...
@@ -84,7 +87,7 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
207
"
>
<state
relative-caret-position=
"
770
"
>
<caret
line=
"40"
column=
"23"
selection-start-line=
"40"
selection-start-column=
"23"
selection-end-line=
"40"
selection-end-column=
"23"
/>
<folding>
<element
signature=
"e#46#106#0"
expanded=
"true"
/>
...
...
@@ -105,8 +108,8 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
0516
"
>
<caret
line=
"5
16"
column=
"22"
selection-start-line=
"516"
selection-start-column=
"22"
selection-end-line=
"51
6"
selection-end-column=
"22"
/>
<state
relative-caret-position=
"1
1352
"
>
<caret
line=
"5
36"
column=
"22"
selection-start-line=
"536"
selection-start-column=
"22"
selection-end-line=
"53
6"
selection-end-column=
"22"
/>
</state>
</provider>
</entry>
...
...
@@ -183,10 +186,10 @@
</option>
</component>
<component
name=
"ProjectFrameBounds"
extendedState=
"6"
>
<option
name=
"x"
value=
"
386
"
/>
<option
name=
"y"
value=
"-
888
"
/>
<option
name=
"width"
value=
"1
44
0"
/>
<option
name=
"height"
value=
"
811
"
/>
<option
name=
"x"
value=
"
500
"
/>
<option
name=
"y"
value=
"-
1080
"
/>
<option
name=
"width"
value=
"1
92
0"
/>
<option
name=
"height"
value=
"
1080
"
/>
</component>
<component
name=
"ProjectLevelVcsManager"
settingsEditedManually=
"true"
/>
<component
name=
"ProjectView"
>
...
...
@@ -194,8 +197,9 @@
<foldersAlwaysOnTop
value=
"true"
/>
</navigator>
<panes>
<pane
id=
"PackagesPane"
/>
<pane
id=
"Scope"
/>
<pane
id=
"PackagesPane"
/>
<pane
id=
"AndroidView"
/>
<pane
id=
"ProjectPane"
>
<subPane>
<expand>
...
...
@@ -247,7 +251,6 @@
<select
/>
</subPane>
</pane>
<pane
id=
"AndroidView"
/>
</panes>
</component>
<component
name=
"PropertiesComponent"
>
...
...
@@ -293,9 +296,9 @@
<servers
/>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"
365"
y=
"-924"
width=
"1440"
height=
"812"
extended-state=
"0
"
/>
<frame
x=
"
-41"
y=
"-1080"
width=
"1920"
height=
"1080"
extended-state=
"6
"
/>
<layout>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.1
9742489
"
/>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.1
4696486
"
/>
<window_info
id=
"Captures"
order=
"1"
side_tool=
"true"
/>
<window_info
id=
"Structure"
order=
"2"
side_tool=
"true"
/>
<window_info
id=
"Image Layers"
order=
"3"
/>
...
...
@@ -310,7 +313,7 @@
<window_info
anchor=
"bottom"
id=
"Android Profiler"
order=
"3"
show_stripe_button=
"false"
/>
<window_info
anchor=
"bottom"
id=
"Logcat"
order=
"4"
weight=
"0.5479833"
/>
<window_info
anchor=
"bottom"
id=
"Debug"
order=
"5"
/>
<window_info
active=
"true"
anchor=
"bottom"
id=
"Terminal"
order=
"6"
visible=
"true"
weight=
"0.
375
"
/>
<window_info
active=
"true"
anchor=
"bottom"
id=
"Terminal"
order=
"6"
visible=
"true"
weight=
"0.
27327934
"
/>
<window_info
anchor=
"bottom"
id=
"Event Log"
order=
"7"
side_tool=
"true"
/>
<window_info
anchor=
"bottom"
id=
"Flutter Performance"
order=
"8"
side_tool=
"true"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"9"
/>
...
...
@@ -524,82 +527,82 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/lib/SharedPlugin.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"330"
>
<caret
line=
"18"
column=
"39"
selection-start-line=
"18"
selection-start-column=
"28"
selection-end-line=
"18"
selection-end-column=
"39"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"10516"
>
<caret
line=
"516"
column=
"22"
selection-start-line=
"516"
selection-start-column=
"22"
selection-end-line=
"516"
selection-end-column=
"22"
/>
<state
relative-caret-position=
"-1495"
>
<caret
line=
"231"
column=
"11"
selection-start-line=
"231"
selection-start-column=
"11"
selection-end-line=
"231"
selection-end-column=
"11"
/>
<folding>
<element
signature=
"e#46#66#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/ios/Classes/Image/ResultManager.h"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/ios/Classes/Image/ResultManager.m"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/main.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
207
"
>
<caret
line=
"
40"
column=
"23"
selection-start-line=
"40"
selection-start-column=
"23"
selection-end-line=
"40"
selection-end-column=
"2
3"
/>
<state
relative-caret-position=
"
3036
"
>
<caret
line=
"
144"
column=
"53"
selection-start-line=
"144"
selection-start-column=
"53"
selection-end-line=
"144"
selection-end-column=
"5
3"
/>
<folding>
<element
signature=
"e#
46#106
#0"
expanded=
"true"
/>
<element
signature=
"e#
0#17
#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
lib/gengmei_flutter_plugin
.dart"
>
<entry
file=
"file://$PROJECT_DIR$/
example/lib/AlbumModel/page/album/AlbumPage
.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
4
2"
>
<caret
line=
"
26"
column=
"41"
selection-start-line=
"26"
selection-start-column=
"41"
selection-end-line=
"26"
selection-end-column=
"41
"
/>
<state
relative-caret-position=
"1
3
2"
>
<caret
line=
"
15"
column=
"2"
selection-start-line=
"15"
selection-start-column=
"2"
selection-end-line=
"15"
selection-end-column=
"2
"
/>
<folding>
<element
signature=
"e#
0#20
#0"
expanded=
"true"
/>
<element
signature=
"e#
45#62
#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/lib/ScanImagePlugn.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
230
"
>
<state
relative-caret-position=
"
836
"
>
<caret
line=
"41"
column=
"1"
selection-start-line=
"41"
selection-start-column=
"1"
selection-end-line=
"41"
selection-end-column=
"1"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
example/lib/AlbumModel/page/album/AlbumPage
.dart"
>
<entry
file=
"file://$PROJECT_DIR$/
lib/gengmei_flutter_plugin
.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
19
0"
>
<caret
line=
"
15"
column=
"2"
selection-start-line=
"15"
selection-start-column=
"2"
selection-end-line=
"15"
selection-end-column=
"2
"
/>
<state
relative-caret-position=
"
44
0"
>
<caret
line=
"
26"
column=
"41"
selection-start-line=
"26"
selection-start-column=
"41"
selection-end-line=
"26"
selection-end-column=
"41
"
/>
<folding>
<element
signature=
"e#
45#62
#0"
expanded=
"true"
/>
<element
signature=
"e#
0#20
#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/lib/
main
.dart"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/
AlbumModel/repository/AlbumRepository
.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
403
"
>
<caret
line=
"
144"
column=
"53"
selection-start-line=
"144"
selection-start-column=
"53"
selection-end-line=
"144"
selection-end-column=
"5
3"
/>
<state
relative-caret-position=
"
770
"
>
<caret
line=
"
40"
column=
"23"
selection-start-line=
"40"
selection-start-column=
"23"
selection-end-line=
"40"
selection-end-column=
"2
3"
/>
<folding>
<element
signature=
"e#
0#17
#0"
expanded=
"true"
/>
<element
signature=
"e#
46#106
#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
example/lib/AlbumModel/page/album/AlbumModel
.dart"
>
<entry
file=
"file://$PROJECT_DIR$/
lib/SharedPlugin
.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"351"
>
<caret
line=
"231"
column=
"11"
selection-start-line=
"231"
selection-start-column=
"11"
selection-end-line=
"231"
selection-end-column=
"11"
/>
<folding>
<element
signature=
"e#46#66#0"
expanded=
"true"
/>
</folding>
<state
relative-caret-position=
"330"
>
<caret
line=
"18"
column=
"39"
selection-start-line=
"18"
selection-start-column=
"28"
selection-end-line=
"18"
selection-end-column=
"39"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"11352"
>
<caret
line=
"536"
column=
"22"
selection-start-line=
"536"
selection-start-column=
"22"
selection-end-line=
"536"
selection-end-column=
"22"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/ios/Classes/Image/ResultManager.h"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/ios/Classes/Image/ResultManager.m"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
</component>
</project>
\ No newline at end of file
ios/Classes/GengmeiFlutterPlugin.m
View file @
00b2ed0f
...
...
@@ -257,11 +257,11 @@ NSString *cacheDirectory;
if
(
assets
.
mediaType
==
PHAssetMediaTypeVideo
)
{
[[
PHImageManager
defaultManager
]
requestAVAssetForVideo
:
assets
options
:
options
resultHandler
:^
(
AVAsset
*
_Nullable
asset
,
AVAudioMix
*
_Nullable
audioMix
,
NSDictionary
*
_Nullable
info
)
{
AVURLAsset
*
urlAsset
=
(
AVURLAsset
*
)
asset
;
self
.
channelSize
++
;
NSMutableDictionary
*
dict
=
[[
NSMutableDictionary
alloc
]
init
];
[
dict
setObject
:
path
[
i
]
forKey
:
@"path"
];
[
dict
setObject
:[
NSString
stringWithFormat
:
@"%@"
,
urlAsset
.
URL
]
forKey
:
@"realVideoPath"
];
@synchronized
(
self
)
{
self
.
channelSize
++
;
[
self
.
channelList
addObject
:
dict
];
}
if
(
self
.
channelSize
==
self
.
channelAllSize
){
...
...
@@ -272,11 +272,11 @@ NSString *cacheDirectory;
}];
}
else
{
if
([
fileManager
fileExistsAtPath
:
tempTake
]){
self
.
channelSize
++
;
NSMutableDictionary
*
dict
=
[[
NSMutableDictionary
alloc
]
init
];
[
dict
setObject
:
path
[
i
]
forKey
:
@"path"
];
[
dict
setObject
:
tempTake
forKey
:
@"realImagePath"
];
@synchronized
(
self
)
{
self
.
channelSize
++
;
[
self
.
channelList
addObject
:
dict
];
}
if
(
self
.
channelSize
==
self
.
channelAllSize
){
...
...
@@ -302,11 +302,11 @@ NSString *cacheDirectory;
data
=
nil
;
res
=
nil
;
}
self
.
channelSize
++
;
NSMutableDictionary
*
dict
=
[[
NSMutableDictionary
alloc
]
init
];
[
dict
setObject
:
path
[
i
]
forKey
:
@"path"
];
[
dict
setObject
:
tempTake
forKey
:
@"realImagePath"
];
@synchronized
(
self
)
{
self
.
channelSize
++
;
[
self
.
channelList
addObject
:
dict
];
}
if
(
self
.
channelSize
==
self
.
channelAllSize
){
...
...
@@ -318,11 +318,11 @@ NSString *cacheDirectory;
}
}
}
else
if
([[
self
.
takePhotoMap
allKeys
]
containsObject
:
path
]){
self
.
channelSize
++
;
NSMutableDictionary
*
dict
=
[[
NSMutableDictionary
alloc
]
init
];
[
dict
setObject
:
path
[
i
]
forKey
:
@"path"
];
[
dict
setObject
:
self
.
takePhotoMap
[
path
]
forKey
:
@"realImagePath"
];
@synchronized
(
self
)
{
self
.
channelSize
++
;
[
self
.
channelList
addObject
:
dict
];
}
if
(
self
.
channelSize
==
self
.
channelAllSize
){
...
...
@@ -540,12 +540,12 @@ NSString *cacheDirectory;
}
-
(
void
)
copyImg
:
(
long
)
resultId
{
self
.
copySize
=
0
;
//
self.copySize=0;
self
.
nowSize
=
0
;
PHImageRequestOptions
*
imageRequestOption
=
[[
PHImageRequestOptions
alloc
]
init
];
imageRequestOption
.
synchronous
=
NO
;
imageRequestOption
.
networkAccessAllowed
=
YES
;
imageRequestOption
.
deliveryMode
=
PHImageRequestOptionsDeliveryModeHighQualityFormat
;
imageRequestOption
.
deliveryMode
=
PHImageRequestOptionsDeliveryModeHighQualityFormat
;
//PHImageRequestOptionsDeliveryModeHighQualityFormat。//PHImageRequestOptionsDeliveryModeFastFormat
// imageRequestOption.deliveryMode=PHImageRequestOptionsDeliveryModeFastFormat;
imageRequestOption
.
resizeMode
=
PHImageRequestOptionsResizeModeFast
;
...
...
@@ -575,13 +575,13 @@ NSString *cacheDirectory;
if
([
fileManager
fileExistsAtPath
:
tmpPath
]
==
YES
){
[[
PHImageManager
defaultManager
]
requestAVAssetForVideo
:
assets
options
:
options
resultHandler
:^
(
AVAsset
*
_Nullable
asset
,
AVAudioMix
*
_Nullable
audioMix
,
NSDictionary
*
_Nullable
info
)
{
AVURLAsset
*
urlAsset
=
(
AVURLAsset
*
)
asset
;
self
.
nowSize
++
;
NSMutableDictionary
*
queryItemDict
=
[
NSMutableDictionary
dictionary
];
[
queryItemDict
setObject
:[
self
getVideoDuring
:
urlAsset
.
duration
]
forKey
:
@"during"
];
[
queryItemDict
setObject
:
tmpPath
forKey
:
@"path"
];
[
queryItemDict
setObject
:
@"T"
forKey
:
@"isVideo"
];
[
self
.
scanMap
setObject
:
assets
forKey
:
tmpPath
];
@synchronized
(
self
)
{
self
.
nowSize
++
;
[
self
.
scanMap
setObject
:
assets
forKey
:
tmpPath
];
NSMutableArray
*
arr
=
self
.
finalMap
[
docName
];
if
(
arr
==
nil
)
{
self
.
finalMap
[
docName
]
=
[
NSMutableArray
array
];
...
...
@@ -619,13 +619,13 @@ NSString *cacheDirectory;
}
[[
PHImageManager
defaultManager
]
requestAVAssetForVideo
:
assets
options
:
options
resultHandler
:^
(
AVAsset
*
_Nullable
asset
,
AVAudioMix
*
_Nullable
audioMix
,
NSDictionary
*
_Nullable
info
)
{
AVURLAsset
*
urlAsset
=
(
AVURLAsset
*
)
asset
;
self
.
nowSize
++
;
NSMutableDictionary
*
queryItemDict
=
[
NSMutableDictionary
dictionary
];
[
queryItemDict
setObject
:[
self
getVideoDuring
:
urlAsset
.
duration
]
forKey
:
@"during"
];
[
queryItemDict
setObject
:
tmpPath
forKey
:
@"path"
];
[
queryItemDict
setObject
:
@"T"
forKey
:
@"isVideo"
];
[
self
.
scanMap
setObject
:
assets
forKey
:
tmpPath
];
@synchronized
(
self
)
{
self
.
nowSize
++
;
[
self
.
scanMap
setObject
:
assets
forKey
:
tmpPath
];
NSMutableArray
*
arr
=
self
.
finalMap
[
docName
];
if
(
arr
==
nil
)
{
self
.
finalMap
[
docName
]
=
[
NSMutableArray
array
];
...
...
@@ -634,10 +634,10 @@ NSString *cacheDirectory;
[
self
.
finalMap
[
docName
]
addObject
:
queryItemDict
];
}
[
self
.
finalMap
[
@"IsGengmeiAlbumAllImages"
]
addObject
:
queryItemDict
];
}
NSLog
(
@"SCARE SIZEEE %d %d "
,
self
.
nowSize
,
self
.
needSize
);
if
(
self
.
nowSize
==
self
.
needSize
)
{
[
self
resultImgs
:
resultId
];
NSLog
(
@"SCARE SIZEEE %d %d "
,
self
.
nowSize
,
self
.
needSize
);
if
(
self
.
nowSize
==
self
.
needSize
)
{
[
self
resultImgs
:
resultId
];
}
}
}];
}];
...
...
@@ -645,12 +645,12 @@ NSString *cacheDirectory;
}
else
{
if
([
fileManager
fileExistsAtPath
:
tmpPath
]
==
YES
){
NSLog
(
@"EXISTTTTTTT"
);
self
.
nowSize
++
;
NSMutableDictionary
*
queryItemDict
=
[
NSMutableDictionary
dictionary
];
[
queryItemDict
setObject
:
tmpPath
forKey
:
@"path"
];
[
queryItemDict
setObject
:
@"F"
forKey
:
@"isVideo"
];
[
self
.
scanMap
setObject
:
assets
forKey
:
tmpPath
];
@synchronized
(
self
)
{
self
.
nowSize
++
;
[
self
.
scanMap
setObject
:
assets
forKey
:
tmpPath
];
NSMutableArray
*
arr
=
self
.
finalMap
[
docName
];
if
(
arr
==
nil
)
{
self
.
finalMap
[
docName
]
=
[
NSMutableArray
array
];
...
...
@@ -659,10 +659,10 @@ NSString *cacheDirectory;
[
self
.
finalMap
[
docName
]
addObject
:
queryItemDict
];
}
[
self
.
finalMap
[
@"IsGengmeiAlbumAllImages"
]
addObject
:
queryItemDict
];
}
NSLog
(
@"SCARE SIZEEE %d %d "
,
self
.
nowSize
,
self
.
needSize
);
if
(
self
.
nowSize
==
self
.
needSize
)
{
[
self
resultImgs
:
resultId
];
NSLog
(
@"SCARE SIZEEE %d %d "
,
self
.
nowSize
,
self
.
needSize
);
if
(
self
.
nowSize
==
self
.
needSize
)
{
[
self
resultImgs
:
resultId
];
}
}
}
else
{
int
picWidth
=
[
assets
pixelWidth
];
...
...
@@ -679,7 +679,6 @@ NSString *cacheDirectory;
}
CGSize
temp
=
CGSizeMake
(
picWidth
*
tempScareSize
,
picHeight
*
tempScareSize
);
[[
PHImageManager
defaultManager
]
requestImageForAsset
:
assets
targetSize
:
temp
contentMode
:
PHImageContentModeDefault
options
:
imageRequestOption
resultHandler
:^
(
UIImage
*
_Nullable
result
,
NSDictionary
*
_Nullable
info
)
{
self
.
nowSize
++
;
@autoreleasepool
{
NSData
*
data
=
UIImageJPEGRepresentation
(
result
,
0
.
8
)
;
[
data
writeToFile
:
tmpPath
atomically
:
YES
];
...
...
@@ -689,9 +688,10 @@ NSString *cacheDirectory;
NSMutableDictionary
*
queryItemDict
=
[
NSMutableDictionary
dictionary
];
[
queryItemDict
setObject
:
tmpPath
forKey
:
@"path"
];
[
queryItemDict
setObject
:
@"F"
forKey
:
@"isVideo"
];
[
self
.
scanMap
setObject
:
assets
forKey
:
tmpPath
];
self
.
copySize
++
;
// self.copySize++;
@synchronized
(
self
)
{
self
.
nowSize
++
;
[
self
.
scanMap
setObject
:
assets
forKey
:
tmpPath
];
NSMutableArray
*
arr
=
self
.
finalMap
[
docName
];
if
(
arr
==
nil
)
{
self
.
finalMap
[
docName
]
=
[
NSMutableArray
array
];
...
...
@@ -700,10 +700,10 @@ NSString *cacheDirectory;
[
self
.
finalMap
[
docName
]
addObject
:
queryItemDict
];
}
[
self
.
finalMap
[
@"IsGengmeiAlbumAllImages"
]
addObject
:
queryItemDict
];
}
NSLog
(
@"SCARE SIZEEE %d %d "
,
self
.
nowSize
,
self
.
needSize
);
if
(
self
.
nowSize
==
self
.
needSize
)
{
[
self
resultImgs
:
resultId
];
NSLog
(
@"SCARE SIZEEE %d %d "
,
self
.
nowSize
,
self
.
needSize
);
if
(
self
.
nowSize
==
self
.
needSize
)
{
[
self
resultImgs
:
resultId
];
}
}
}];
}
...
...
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