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

comit

parent d44d2e62
<?xml version="1.0" encoding="UTF-8"?>
<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">
<option name="id" value="io.flutter" />
</component>
......
......@@ -6,7 +6,11 @@
</component>
<component name="ChangeListManager">
<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>
<ignored path="$PROJECT_DIR$/.dart_tool/" />
<ignored path="$PROJECT_DIR$/.idea/" />
......@@ -29,7 +33,7 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/ScanImagePlugn.dart">
<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" />
<folding>
<element signature="e#45#86#0" expanded="$ENABLE_FLUTTER_DESKTOP$" />
......@@ -100,7 +104,7 @@
<file pinned="false" current-in-tab="$ENABLE_FLUTTER_DESKTOP$">
<entry file="file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart">
<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" />
<folding>
<element signature="e#0#20#0" expanded="$ENABLE_FLUTTER_DESKTOP$" />
......@@ -112,7 +116,7 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart">
<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" />
<folding>
<element signature="e#45#62#0" expanded="$ENABLE_FLUTTER_DESKTOP$" />
......@@ -193,9 +197,9 @@
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="18" />
<option name="y" value="125" />
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="-93" />
<option name="y" value="108" />
<option name="width" value="1440" />
<option name="height" value="811" />
</component>
......@@ -205,6 +209,7 @@
<foldersAlwaysOnTop value="$ENABLE_FLUTTER_DESKTOP$" />
</navigator>
<panes>
<pane id="PackagesPane" />
<pane id="ProjectPane">
<subPane>
<expand>
......@@ -235,7 +240,6 @@
</subPane>
</pane>
<pane id="Scope" />
<pane id="PackagesPane" />
<pane id="AndroidView" />
</panes>
</component>
......@@ -283,7 +287,8 @@
<servers />
</component>
<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>
<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$" />
......@@ -295,12 +300,12 @@
<window_info id="Capture Tool" order="7" />
<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 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="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="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="Flutter Performance" order="8" side_tool="$ENABLE_FLUTTER_DESKTOP$" />
<window_info anchor="bottom" id="Version Control" order="9" />
......@@ -565,7 +570,7 @@
</entry>
<entry file="file://$PROJECT_DIR$/lib/ScanImagePlugn.dart">
<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" />
<folding>
<element signature="e#45#86#0" expanded="$ENABLE_FLUTTER_DESKTOP$" />
......@@ -620,7 +625,7 @@
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart">
<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" />
<folding>
<element signature="e#45#62#0" expanded="$ENABLE_FLUTTER_DESKTOP$" />
......@@ -630,7 +635,7 @@
</entry>
<entry file="file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart">
<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" />
<folding>
<element signature="e#0#20#0" expanded="$ENABLE_FLUTTER_DESKTOP$" />
......
......@@ -123,7 +123,7 @@ class ImageRespository {
val start = System.currentTimeMillis();
val needSize = recordImageListMap.size;
var currentSize = 0
var letSize = 10
var letSize = 60
var noPathSize = 0
globalThreadPool.execute {
for (index in 0..(recordImageListMap.size - 1)) {
......@@ -191,7 +191,7 @@ class ImageRespository {
listener.onSuccess(toMapSync(context, recordImageListMap))
} else {
if (noPathSize > letSize) {
letSize += 70
letSize += 200
listener.onSuccess(toMapSync(context, recordImageListMap))
}
}
......@@ -363,7 +363,7 @@ class ImageRespository {
companion object {
private var instance: ImageRespository? = null
const val TAG: String = "Image_Picker"
private val globalThreadPool = ThreadPoolExecutor(8, 8
private val globalThreadPool = ThreadPoolExecutor(10, 10
, 30, TimeUnit.SECONDS, LinkedBlockingQueue<Runnable>());
fun getInstance(): ImageRespository {
......
......@@ -26,6 +26,8 @@ import android.opengl.ETC1.getHeight
import android.opengl.ETC1.getWidth
/**
* @author lsy
* @date 2019-09-10
......@@ -55,7 +57,7 @@ class MyUtil {
fun getFileName(pathandname: String): String? {
val start = pathandname.lastIndexOf("/")
val end = pathandname.lastIndexOf(".")
if (end == -1) {
if(end==-1){
return pathandname.substring(start + 1, pathandname.length)
}
return if (start != -1 && end != -1) {
......@@ -96,7 +98,7 @@ class MyUtil {
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()
// 开始读入图片,此时把options.inJustDecodeBounds 设回true,即只读边不读内容
newOpts.inJustDecodeBounds = true
......@@ -131,14 +133,14 @@ class MyUtil {
val file = File(filePath)
try {
val out = FileOutputStream(file)
if (degree != 0) {
if(degree!=0){
matrix.reset()
matrix.postRotate(degree.toFloat());
val resizedBitmap = Bitmap.createBitmap(bitmap, 0, 0,
bitmap.width, bitmap.height, matrix, true)
resizedBitmap.compress(Bitmap.CompressFormat.PNG, quality, out)
resizedBitmap.recycle()
} else {
}else{
bitmap.compress(Bitmap.CompressFormat.PNG, quality, out)
}
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