Commit d44d2e62 authored by 林生雨's avatar 林生雨

commit

parent 8d292e37
......@@ -5,7 +5,9 @@
<option name="TOOL_WINDOW_CONFIGURED_FILTER" value="Show only selected application" />
</component>
<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" />
</list>
<ignored path="$PROJECT_DIR$/.dart_tool/" />
<ignored path="$PROJECT_DIR$/.idea/" />
<ignored path="$PROJECT_DIR$/.pub/" />
......@@ -21,7 +23,7 @@
<component name="DefaultGradleProjectSettings">
<option name="isMigrated" value="$ENABLE_FLUTTER_DESKTOP$" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="c5a90f6" />
<component name="ExecutionTargetManager" SELECTED_TARGET="Pixel_2_API_25" />
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
......@@ -98,8 +100,8 @@
<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="170">
<caret line="42" column="40" selection-start-line="42" selection-start-column="40" selection-end-line="42" selection-end-column="40" />
<state relative-caret-position="148">
<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$" />
</folding>
......@@ -192,8 +194,8 @@
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="318" />
<option name="y" value="226" />
<option name="x" value="18" />
<option name="y" value="125" />
<option name="width" value="1440" />
<option name="height" value="811" />
</component>
......@@ -281,8 +283,7 @@
<servers />
</component>
<component name="ToolWindowManager">
<frame x="318" y="226" width="1440" height="811" extended-state="0" />
<editor active="$ENABLE_FLUTTER_DESKTOP$" />
<frame x="124" y="117" width="1440" height="811" extended-state="0" />
<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$" />
......@@ -294,12 +295,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 anchor="bottom" id="Run" order="1" weight="0.5" />
<window_info active="$ENABLE_FLUTTER_DESKTOP$" anchor="bottom" id="Run" order="1" visible="$ENABLE_FLUTTER_DESKTOP$" 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 anchor="bottom" id="Debug" order="5" />
<window_info active="$ENABLE_FLUTTER_DESKTOP$" anchor="bottom" id="Terminal" order="6" visible="$ENABLE_FLUTTER_DESKTOP$" weight="0.32545203" />
<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="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" />
......@@ -629,8 +630,8 @@
</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="170">
<caret line="42" column="40" selection-start-line="42" selection-start-column="40" selection-end-line="42" selection-end-column="40" />
<state relative-caret-position="148">
<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$" />
</folding>
......
......@@ -145,6 +145,7 @@ class ImageRespository {
}
}
} else {
Log.e("lsy"," !!!! ${realPath} ${getFileName(realPath)==null}")
val tempFilePngString = fileDir + "/" + getFileName(realPath)!! + ".png";
val tempFilePngExists = File(tempFilePngString).exists()
if (tempFilePngExists) {
......
......@@ -26,8 +26,6 @@ import android.opengl.ETC1.getHeight
import android.opengl.ETC1.getWidth
/**
* @author lsy
* @date 2019-09-10
......@@ -57,6 +55,9 @@ class MyUtil {
fun getFileName(pathandname: String): String? {
val start = pathandname.lastIndexOf("/")
val end = pathandname.lastIndexOf(".")
if (end == -1) {
return pathandname.substring(start + 1, pathandname.length)
}
return if (start != -1 && end != -1) {
pathandname.substring(start + 1, end)
} else {
......@@ -95,7 +96,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
......@@ -130,14 +131,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()
......
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
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