Commit d21714d9 authored by keyongyu's avatar keyongyu

2.4.0.2

parent 395acb21
...@@ -118,7 +118,7 @@ public static Bitmap Cut(Bitmap sourceBitmap, int StartX, int StartY, int cutWid ...@@ -118,7 +118,7 @@ public static Bitmap Cut(Bitmap sourceBitmap, int StartX, int StartY, int cutWid
/// <param name="filename">保存路径</param> /// <param name="filename">保存路径</param>
/// <param name="quality">质量</param> /// <param name="quality">质量</param>
/// <returns>是否保存成功</returns> /// <returns>是否保存成功</returns>
public static bool SaveAsJPEG(Bitmap bitmap, string filename, int quality) public static bool SaveAsJPEG(Bitmap bitmap, string filename, int quality=90)
{ {
if ( bitmap != null ) if ( bitmap != null )
{ {
...@@ -134,17 +134,23 @@ public static bool SaveAsJPEG(Bitmap bitmap, string filename, int quality) ...@@ -134,17 +134,23 @@ public static bool SaveAsJPEG(Bitmap bitmap, string filename, int quality)
if ( codec.MimeType.IndexOf("jpeg") > -1 ) if ( codec.MimeType.IndexOf("jpeg") > -1 )
{ {
ici = codec; ici = codec;
break;
} }
if ( quality < 0 || quality > 100 )
quality = 60;
EncoderParameters encoderParams = new EncoderParameters();
encoderParams.Param[0] = new EncoderParameter(Encoder.Quality, (long)quality);
if ( ici != null )
bitmap.Save(filename, ici, encoderParams);
else
bitmap.Save(filename, ImageFormat.Jpeg);
} }
return true; if (quality < 0 || quality > 100)
quality = 60;
EncoderParameters encoderParams = new EncoderParameters();
encoderParams.Param[0] = new EncoderParameter(Encoder.Quality, (long)quality);
if (ici != null)
{
bitmap.Save(filename, ici, encoderParams);
bitmap.Dispose();
return true;
}
else
{
return false;
}
} }
return false; return false;
} }
......
...@@ -28,4 +28,4 @@ ...@@ -28,4 +28,4 @@
// //
// You can specify all the values or you can use the default the Revision and // You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below: // Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("2.4.0.1")] [assembly: AssemblyVersion("2.4.0.2")]
★更新历史 ★更新历史
2.4.0.2
修改导入游戏卡图
2.4.0.1 2.4.0.1
更新数据 更新数据
2.4.0.0 2.4.0.0
......
[DataEditorX]2.4.0.1[DataEditorX] [DataEditorX]2.4.0.2[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL] [URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★运行环境(Environment) ★运行环境(Environment)
......
No preview for this file type
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<connectionStrings> <connectionStrings>
<!-- Example connection to a SQL Server Database on localhost. --> <!-- Example connection to a SQL Server Database on localhost. -->
<!-- <add name="ExampleConnectionString" <!-- <add name="ExampleConnectionString"
connectionString="Data Source=.;Initial Catalog=DBName;Integrated Security=True" connectionString="Data Source=.;Initial Catalog=DBName;Integrated Security=True"
providerName="System.Data.SqlClient" /> --> providerName="System.Data.SqlClient" /> -->
</connectionStrings> </connectionStrings>
<appSettings> <appSettings>
<!-- access these values via the property: <!-- access these values via the property:
System.Configuration.ConfigurationManager.AppSettings[key] System.Configuration.ConfigurationManager.AppSettings[key]
--> -->
<!-- MSE language data/mse_xxx.txt --> <!-- MSE language data/mse_xxx.txt -->
<add key="mse" value="Chinese-Simplified" /> <add key="mse" value="Chinese-Simplified" />
<!-- Language data/cardinfo_xxxx.txt data/language_xxx.txt --> <!-- Language data/cardinfo_xxxx.txt data/language_xxx.txt -->
<add key="language" value="Chinese" /> <add key="language" value="english" />
<!-- Check system language when running program first time --> <!-- Check system language when running program first time -->
<add key="check_system_language" value="false" /> <add key="check_system_language" value="true" />
<!-- async load data --> <!-- async load data -->
<add key="async" value="false" /> <add key="async" value="false" />
<!-- DataEditorX source code --> <!-- DataEditorX source code -->
<add key="sourceURL" value="https://github.com/247321453/DataEditorX" /> <add key="sourceURL" value="https://github.com/247321453/DataEditorX" />
<!-- DataEditorX update url--> <!-- DataEditorX update url-->
<add key="updateURL" value="https://github.com/247321453/DataEditorX/tree/master/win32/readme.txt" /> <add key="updateURL" value="https://github.com/247321453/DataEditorX/tree/master/win32/readme.txt" />
<!-- delete,modify with card's files image script --> <!-- delete,modify with card's files image script -->
<add key="opera_with_cards_file" value="true" /> <add key="opera_with_cards_file" value="true" />
<!-- open file in this.such as lua --> <!-- open file in this.such as lua -->
<add key="open_file_in_this" value="true" /> <add key="open_file_in_this" value="true" />
<!-- check update when opening application automatically --> <!-- check update when opening application automatically -->
<add key="auto_check_update" value="true" /> <add key="auto_check_update" value="true" />
<!-- Cut Images Setting --> <!-- Cut Images Setting -->
<add key="image_quilty" value="100" /> <add key="image_quilty" value="100" />
<add key="image" value="44,64,177,254" /> <add key="image" value="44,64,177,254" />
<add key="image_other" value="25,54,128,128" /> <add key="image_other" value="25,54,128,128" />
<add key="image_xyz" value="24,51,128,128" /> <add key="image_xyz" value="24,51,128,128" />
<add key="image_pendulum" value="14,46,149,120" /> <add key="image_pendulum" value="14,46,149,120" />
<!-- CodeEdiotr Setting <!-- CodeEdiotr Setting
IME = true 使用輸入法,正常顯示文字,反應變慢 IME = true 使用輸入法,正常顯示文字,反應變慢
IME = false English IME = false English
--> -->
<add key="IME" value="false" /> <add key="IME" value="false" />
<add key="wordwrap" value="true" /> <add key="wordwrap" value="true" />
<add key="tabisspace" value="false" /> <add key="tabisspace" value="false" />
<add key="fontname" value="Consolas" /> <add key="fontname" value="Consolas" />
<add key="fontsize" value="14.5" /> <add key="fontsize" value="14.5" />
<!-- MSE path--> <!-- MSE path-->
<add key="mse_path" value="./MagicSetEditor2/mse.exe" /> <add key="mse_path" value="./MagicSetEditor2/mse.exe"/>
<add key="mse_exprotpath" value="./exprot" /> <add key="mse_exprotpath" value="./exprot"/>
</appSettings> </appSettings>
</configuration> </configuration>
\ No newline at end of file
★更新历史 ★更新历史
2.4.0.2
修改导入游戏卡图
2.4.0.1 2.4.0.1
更新数据 更新数据
2.4.0.0 2.4.0.0
......
[DataEditorX]2.4.0.1[DataEditorX] [DataEditorX]2.4.0.2[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL] [URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★运行环境(Environment) ★运行环境(Environment)
......
No preview for this file type
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