Commit 6e905db7 authored by 林生雨's avatar 林生雨

comit

parent d44d2e62
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Android API 29 Platform" project-jdk-type="Android SDK" /> <component name="ProjectRootManager" version="2" project-jdk-name="Android API 28 Platform" project-jdk-type="Android SDK" />
<component name="ProjectType"> <component name="ProjectType">
<option name="id" value="io.flutter" /> <option name="id" value="io.flutter" />
</component> </component>
......
...@@ -6,7 +6,11 @@ ...@@ -6,7 +6,11 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="$ENABLE_FLUTTER_DESKTOP$" id="5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba" name="Default Changelist" comment=""> <list default="$ENABLE_FLUTTER_DESKTOP$" id="5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/example/android/gradle.properties" beforeDir="false" afterPath="$PROJECT_DIR$/example/android/gradle.properties" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/kotlin/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/kotlin/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/kotlin/com/example/gengmei_flutter_plugin/utils/MyUtil.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/kotlin/com/example/gengmei_flutter_plugin/utils/MyUtil.kt" 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" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/kotlin/com/example/gengmei_flutter_plugin/utils/MyUtil.kt" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/kotlin/com/example/gengmei_flutter_plugin/utils/MyUtil.kt" afterDir="false" />
</list> </list>
<ignored path="$PROJECT_DIR$/.dart_tool/" /> <ignored path="$PROJECT_DIR$/.dart_tool/" />
<ignored path="$PROJECT_DIR$/.idea/" /> <ignored path="$PROJECT_DIR$/.idea/" />
...@@ -29,7 +33,7 @@ ...@@ -29,7 +33,7 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/ScanImagePlugn.dart"> <entry file="file://$PROJECT_DIR$/lib/ScanImagePlugn.dart">
<provider selected="$ENABLE_FLUTTER_DESKTOP$" editor-type-id="text-editor"> <provider selected="$ENABLE_FLUTTER_DESKTOP$" editor-type-id="text-editor">
<state relative-caret-position="550"> <state relative-caret-position="528">
<caret line="28" selection-start-line="28" selection-end-line="28" /> <caret line="28" selection-start-line="28" selection-end-line="28" />
<folding> <folding>
<element signature="e#45#86#0" expanded="$ENABLE_FLUTTER_DESKTOP$" /> <element signature="e#45#86#0" expanded="$ENABLE_FLUTTER_DESKTOP$" />
...@@ -100,7 +104,7 @@ ...@@ -100,7 +104,7 @@
<file pinned="false" current-in-tab="$ENABLE_FLUTTER_DESKTOP$"> <file pinned="false" current-in-tab="$ENABLE_FLUTTER_DESKTOP$">
<entry file="file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"> <entry file="file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart">
<provider selected="$ENABLE_FLUTTER_DESKTOP$" editor-type-id="text-editor"> <provider selected="$ENABLE_FLUTTER_DESKTOP$" editor-type-id="text-editor">
<state relative-caret-position="148"> <state relative-caret-position="891">
<caret line="41" column="61" selection-start-line="41" selection-start-column="61" selection-end-line="41" selection-end-column="61" /> <caret line="41" column="61" selection-start-line="41" selection-start-column="61" selection-end-line="41" selection-end-column="61" />
<folding> <folding>
<element signature="e#0#20#0" expanded="$ENABLE_FLUTTER_DESKTOP$" /> <element signature="e#0#20#0" expanded="$ENABLE_FLUTTER_DESKTOP$" />
...@@ -112,7 +116,7 @@ ...@@ -112,7 +116,7 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart"> <entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart">
<provider selected="$ENABLE_FLUTTER_DESKTOP$" editor-type-id="text-editor"> <provider selected="$ENABLE_FLUTTER_DESKTOP$" editor-type-id="text-editor">
<state relative-caret-position="4048"> <state relative-caret-position="3916">
<caret line="187" column="18" selection-start-line="187" selection-start-column="18" selection-end-line="187" selection-end-column="18" /> <caret line="187" column="18" selection-start-line="187" selection-start-column="18" selection-end-line="187" selection-end-column="18" />
<folding> <folding>
<element signature="e#45#62#0" expanded="$ENABLE_FLUTTER_DESKTOP$" /> <element signature="e#45#62#0" expanded="$ENABLE_FLUTTER_DESKTOP$" />
...@@ -193,9 +197,9 @@ ...@@ -193,9 +197,9 @@
</list> </list>
</option> </option>
</component> </component>
<component name="ProjectFrameBounds"> <component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="18" /> <option name="x" value="-93" />
<option name="y" value="125" /> <option name="y" value="108" />
<option name="width" value="1440" /> <option name="width" value="1440" />
<option name="height" value="811" /> <option name="height" value="811" />
</component> </component>
...@@ -205,6 +209,7 @@ ...@@ -205,6 +209,7 @@
<foldersAlwaysOnTop value="$ENABLE_FLUTTER_DESKTOP$" /> <foldersAlwaysOnTop value="$ENABLE_FLUTTER_DESKTOP$" />
</navigator> </navigator>
<panes> <panes>
<pane id="PackagesPane" />
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
<expand> <expand>
...@@ -235,7 +240,6 @@ ...@@ -235,7 +240,6 @@
</subPane> </subPane>
</pane> </pane>
<pane id="Scope" /> <pane id="Scope" />
<pane id="PackagesPane" />
<pane id="AndroidView" /> <pane id="AndroidView" />
</panes> </panes>
</component> </component>
...@@ -283,7 +287,8 @@ ...@@ -283,7 +287,8 @@
<servers /> <servers />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="124" y="117" width="1440" height="811" extended-state="0" /> <frame x="10" y="23" width="1440" height="811" extended-state="6" />
<editor active="$ENABLE_FLUTTER_DESKTOP$" />
<layout> <layout>
<window_info content_ui="combo" id="Project" order="0" visible="$ENABLE_FLUTTER_DESKTOP$" weight="0.19742489" /> <window_info content_ui="combo" id="Project" order="0" visible="$ENABLE_FLUTTER_DESKTOP$" weight="0.19742489" />
<window_info id="Captures" order="1" side_tool="$ENABLE_FLUTTER_DESKTOP$" /> <window_info id="Captures" order="1" side_tool="$ENABLE_FLUTTER_DESKTOP$" />
...@@ -295,12 +300,12 @@ ...@@ -295,12 +300,12 @@
<window_info id="Capture Tool" order="7" /> <window_info id="Capture Tool" order="7" />
<window_info id="Favorites" order="8" side_tool="$ENABLE_FLUTTER_DESKTOP$" /> <window_info id="Favorites" order="8" side_tool="$ENABLE_FLUTTER_DESKTOP$" />
<window_info anchor="bottom" id="Dart Analysis" order="0" weight="0.32963988" /> <window_info anchor="bottom" id="Dart Analysis" order="0" weight="0.32963988" />
<window_info active="$ENABLE_FLUTTER_DESKTOP$" anchor="bottom" id="Run" order="1" visible="$ENABLE_FLUTTER_DESKTOP$" weight="0.4993046" /> <window_info anchor="bottom" id="Run" order="1" weight="0.4993046" />
<window_info anchor="bottom" id="TODO" order="2" /> <window_info anchor="bottom" id="TODO" order="2" />
<window_info anchor="bottom" id="Android Profiler" order="3" show_stripe_button="false" /> <window_info anchor="bottom" id="Android Profiler" order="3" show_stripe_button="false" />
<window_info anchor="bottom" id="Logcat" order="4" weight="0.29639888" /> <window_info active="$ENABLE_FLUTTER_DESKTOP$" anchor="bottom" id="Logcat" order="4" visible="$ENABLE_FLUTTER_DESKTOP$" weight="0.20166898" />
<window_info anchor="bottom" id="Debug" order="5" weight="0.32962447" /> <window_info anchor="bottom" id="Debug" order="5" weight="0.32962447" />
<window_info anchor="bottom" id="Terminal" order="6" weight="0.60500693" /> <window_info anchor="bottom" id="Terminal" order="6" weight="0.2823366" />
<window_info anchor="bottom" id="Event Log" order="7" side_tool="$ENABLE_FLUTTER_DESKTOP$" /> <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="Flutter Performance" order="8" side_tool="$ENABLE_FLUTTER_DESKTOP$" />
<window_info anchor="bottom" id="Version Control" order="9" /> <window_info anchor="bottom" id="Version Control" order="9" />
...@@ -565,7 +570,7 @@ ...@@ -565,7 +570,7 @@
</entry> </entry>
<entry file="file://$PROJECT_DIR$/lib/ScanImagePlugn.dart"> <entry file="file://$PROJECT_DIR$/lib/ScanImagePlugn.dart">
<provider selected="$ENABLE_FLUTTER_DESKTOP$" editor-type-id="text-editor"> <provider selected="$ENABLE_FLUTTER_DESKTOP$" editor-type-id="text-editor">
<state relative-caret-position="550"> <state relative-caret-position="528">
<caret line="28" selection-start-line="28" selection-end-line="28" /> <caret line="28" selection-start-line="28" selection-end-line="28" />
<folding> <folding>
<element signature="e#45#86#0" expanded="$ENABLE_FLUTTER_DESKTOP$" /> <element signature="e#45#86#0" expanded="$ENABLE_FLUTTER_DESKTOP$" />
...@@ -620,7 +625,7 @@ ...@@ -620,7 +625,7 @@
</entry> </entry>
<entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart"> <entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart">
<provider selected="$ENABLE_FLUTTER_DESKTOP$" editor-type-id="text-editor"> <provider selected="$ENABLE_FLUTTER_DESKTOP$" editor-type-id="text-editor">
<state relative-caret-position="4048"> <state relative-caret-position="3916">
<caret line="187" column="18" selection-start-line="187" selection-start-column="18" selection-end-line="187" selection-end-column="18" /> <caret line="187" column="18" selection-start-line="187" selection-start-column="18" selection-end-line="187" selection-end-column="18" />
<folding> <folding>
<element signature="e#45#62#0" expanded="$ENABLE_FLUTTER_DESKTOP$" /> <element signature="e#45#62#0" expanded="$ENABLE_FLUTTER_DESKTOP$" />
...@@ -630,7 +635,7 @@ ...@@ -630,7 +635,7 @@
</entry> </entry>
<entry file="file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart"> <entry file="file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart">
<provider selected="$ENABLE_FLUTTER_DESKTOP$" editor-type-id="text-editor"> <provider selected="$ENABLE_FLUTTER_DESKTOP$" editor-type-id="text-editor">
<state relative-caret-position="148"> <state relative-caret-position="891">
<caret line="41" column="61" selection-start-line="41" selection-start-column="61" selection-end-line="41" selection-end-column="61" /> <caret line="41" column="61" selection-start-line="41" selection-start-column="61" selection-end-line="41" selection-end-column="61" />
<folding> <folding>
<element signature="e#0#20#0" expanded="$ENABLE_FLUTTER_DESKTOP$" /> <element signature="e#0#20#0" expanded="$ENABLE_FLUTTER_DESKTOP$" />
......
...@@ -123,7 +123,7 @@ class ImageRespository { ...@@ -123,7 +123,7 @@ class ImageRespository {
val start = System.currentTimeMillis(); val start = System.currentTimeMillis();
val needSize = recordImageListMap.size; val needSize = recordImageListMap.size;
var currentSize = 0 var currentSize = 0
var letSize = 10 var letSize = 60
var noPathSize = 0 var noPathSize = 0
globalThreadPool.execute { globalThreadPool.execute {
for (index in 0..(recordImageListMap.size - 1)) { for (index in 0..(recordImageListMap.size - 1)) {
...@@ -191,7 +191,7 @@ class ImageRespository { ...@@ -191,7 +191,7 @@ class ImageRespository {
listener.onSuccess(toMapSync(context, recordImageListMap)) listener.onSuccess(toMapSync(context, recordImageListMap))
} else { } else {
if (noPathSize > letSize) { if (noPathSize > letSize) {
letSize += 70 letSize += 200
listener.onSuccess(toMapSync(context, recordImageListMap)) listener.onSuccess(toMapSync(context, recordImageListMap))
} }
} }
...@@ -363,7 +363,7 @@ class ImageRespository { ...@@ -363,7 +363,7 @@ class ImageRespository {
companion object { companion object {
private var instance: ImageRespository? = null private var instance: ImageRespository? = null
const val TAG: String = "Image_Picker" const val TAG: String = "Image_Picker"
private val globalThreadPool = ThreadPoolExecutor(8, 8 private val globalThreadPool = ThreadPoolExecutor(10, 10
, 30, TimeUnit.SECONDS, LinkedBlockingQueue<Runnable>()); , 30, TimeUnit.SECONDS, LinkedBlockingQueue<Runnable>());
fun getInstance(): ImageRespository { fun getInstance(): ImageRespository {
......
...@@ -26,6 +26,8 @@ import android.opengl.ETC1.getHeight ...@@ -26,6 +26,8 @@ import android.opengl.ETC1.getHeight
import android.opengl.ETC1.getWidth import android.opengl.ETC1.getWidth
/** /**
* @author lsy * @author lsy
* @date 2019-09-10 * @date 2019-09-10
...@@ -55,7 +57,7 @@ class MyUtil { ...@@ -55,7 +57,7 @@ class MyUtil {
fun getFileName(pathandname: String): String? { fun getFileName(pathandname: String): String? {
val start = pathandname.lastIndexOf("/") val start = pathandname.lastIndexOf("/")
val end = pathandname.lastIndexOf(".") val end = pathandname.lastIndexOf(".")
if (end == -1) { if(end==-1){
return pathandname.substring(start + 1, pathandname.length) return pathandname.substring(start + 1, pathandname.length)
} }
return if (start != -1 && end != -1) { return if (start != -1 && end != -1) {
...@@ -96,7 +98,7 @@ class MyUtil { ...@@ -96,7 +98,7 @@ class MyUtil {
return filePath return filePath
} }
fun scareImg(imgPath: String, scareSize: Float, filePath: String, quality: Int, degree: Int): String { fun scareImg(imgPath: String, scareSize: Float, filePath: String, quality: Int,degree:Int): String {
val newOpts = BitmapFactory.Options() val newOpts = BitmapFactory.Options()
// 开始读入图片,此时把options.inJustDecodeBounds 设回true,即只读边不读内容 // 开始读入图片,此时把options.inJustDecodeBounds 设回true,即只读边不读内容
newOpts.inJustDecodeBounds = true newOpts.inJustDecodeBounds = true
...@@ -131,14 +133,14 @@ class MyUtil { ...@@ -131,14 +133,14 @@ class MyUtil {
val file = File(filePath) val file = File(filePath)
try { try {
val out = FileOutputStream(file) val out = FileOutputStream(file)
if (degree != 0) { if(degree!=0){
matrix.reset() matrix.reset()
matrix.postRotate(degree.toFloat()); matrix.postRotate(degree.toFloat());
val resizedBitmap = Bitmap.createBitmap(bitmap, 0, 0, val resizedBitmap = Bitmap.createBitmap(bitmap, 0, 0,
bitmap.width, bitmap.height, matrix, true) bitmap.width, bitmap.height, matrix, true)
resizedBitmap.compress(Bitmap.CompressFormat.PNG, quality, out) resizedBitmap.compress(Bitmap.CompressFormat.PNG, quality, out)
resizedBitmap.recycle() resizedBitmap.recycle()
} else { }else{
bitmap.compress(Bitmap.CompressFormat.PNG, quality, out) bitmap.compress(Bitmap.CompressFormat.PNG, quality, out)
} }
out.flush() out.flush()
......
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