91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 3.25MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2023-10-27
  • 語言: C#
  • 標簽:

資源簡介

在c#中利用gdal對圖像格式進行相互轉換,文件包括整個項目,可以在vs中直接代開,具體代碼明確,已經經過測試。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.IO;
using?System.Diagnostics;
using?System.Drawing;
using?System.Drawing.Imaging;
//langyue_wu@163.com

namespace?ImageConvert
{
????class?ChangeImageClass
????{
????????private?string?_dataPath;
????????private?string?_savePath;
????????private?int?_pathIndex;
????????private?string?_fileExtension;
????????private?string?_pixFormat;
????????private?float?_ResolutionH;
????????private?float?_ResolutionV;

????????private?int?_fileCount;
????????private?int?_fileInc;


????????public?delegate?void?ShowMessageHander(string?strMessage);
????????public?event?ShowMessageHander?ShowMessageEvent;

????????public?delegate?void?ShowExceptionHander(string?strMessage);
????????public?event?ShowExceptionHander?ShowExceptionEvent;

????????public?delegate?void?AfterWorkHander();
????????public?event?AfterWorkHander?AfterWorkEvent;

????????public?delegate?void?ShowProgressHander(int?progressNum?int?totalNum);
????????public?event?ShowProgressHander?ShowProgressEvent;

????????public?ChangeImageClass(string?dataPath?string?savePath?string?fileExtension?string?pixFormat?float?ResolutionH?float?ResolutionV)
????????{
????????????_dataPath?=?dataPath;
????????????_savePath?=?savePath;
????????????_fileExtension?=?fileExtension;
????????????_pixFormat?=?pixFormat;
????????????_ResolutionH?=?ResolutionH;
????????????_ResolutionV?=?ResolutionV;
????????}

????????public?void?MainProcess()
????????{
????????????try
????????????{
????????????????DirectoryInfo?dirParent?=?Directory.GetParent(_dataPath);
????????????????_pathIndex?=?dirParent.FullName.Length;
????????????????_savePath?=?Path.Combine(_savePath?_dataPath.Substring(_pathIndex).TrimStart(‘\\‘)?+?“轉換后“);
????????????????_pathIndex?=?_dataPath.Length;
????????????????DirectoryInfo?dirInfo?=?new?DirectoryInfo(_dataPath);
????????????????_fileCount?=?dirInfo.GetFiles(“*.*“?SearchOption.AllDirectories).Length;
????????????????ShowMessageEvent(string.Format(“總文件數:{0}“?_fileCount));
????????????????_fileInc?=?0;
????????????????ListFolder(dirInfo?true);
????????????????ShowMessageEvent(string.Format(“處理文件數:{0}“?_fileInc));
????????????????AfterWorkEvent();
????????????}
????????????catch?(Exception?ee)
????????????{
????????????????//盤符目錄
????????????????ShowExceptionEvent(string.Format(“【異常】{0}“?ee.Message));
????????????}

????????}

????????///?
????????///?遞歸目錄
????????///?

????????///?文件信息
????????///?是否遞歸子項
????????private?void?ListFolder(FileSystemInfo?fileInfo?bool?getChildren)
????????{

????????????if?(!fileInfo.Exists)?return;//如果文件不存在,返回
????????????DirectoryInfo?dirInfo?=?fileInfo?as?DirectoryInfo;//轉換成目錄
????????????if?(dirInfo?==?null)?return;???//不是目錄?
????????????if?(getChildren)
????????????{
????????????????DirectoryInfo[]?dirs?=?dirInfo.G

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-09-12?20:26??ImageConvert\
?????目錄???????????0??2013-09-12?20:36??ImageConvert\ImageConvert\
?????文件???????10677??2013-09-12?20:54??ImageConvert\ImageConvert\ChangeImageClass.cs
?????文件????????7675??2013-09-12?20:30??ImageConvert\ImageConvert\FormMain.cs
?????文件???????16753??2013-09-12?20:30??ImageConvert\ImageConvert\FormMain.designer.cs
?????文件??????253360??2013-09-12?20:30??ImageConvert\ImageConvert\FormMain.resx
?????文件????????5744??2013-09-12?20:36??ImageConvert\ImageConvert\ImageConvert.csproj
?????文件?????????580??2012-12-12?00:58??ImageConvert\ImageConvert\ImageConvert.csproj.user
?????文件?????????474??2011-04-16?11:51??ImageConvert\ImageConvert\Program.cs
?????目錄???????????0??2011-10-27?14:41??ImageConvert\ImageConvert\Properties\
?????文件????????1203??2013-09-12?20:53??ImageConvert\ImageConvert\Properties\AssemblyInfo.cs
?????文件????????2862??2012-12-12?00:58??ImageConvert\ImageConvert\Properties\Resources.Designer.cs
?????文件????????5612??2011-04-16?11:50??ImageConvert\ImageConvert\Properties\Resources.resx
?????文件????????1110??2012-12-12?00:58??ImageConvert\ImageConvert\Properties\Settings.Designer.cs
?????文件?????????249??2011-04-16?11:50??ImageConvert\ImageConvert\Properties\Settings.settings
?????目錄???????????0??2013-09-12?21:47??ImageConvert\ImageConvert\bin\
?????文件?????6447104??2011-04-16?11:50??ImageConvert\ImageConvert\gdal18.dll
?????文件??????161862??2011-04-16?11:50??ImageConvert\ImageConvert\iPulse.ico
?????目錄???????????0??2013-09-12?20:28??ImageConvert\ImageConvert\libs\
?????文件????????7030??2011-04-16?11:50??ImageConvert\ImageConvert\libs\FileProcessClass.cs
?????文件??????421200??2011-04-16?14:18??ImageConvert\ImageConvert\msvcp100.dll
?????文件??????770384??2011-04-16?12:06??ImageConvert\ImageConvert\msvcr100.dll
?????目錄???????????0??2011-10-27?14:41??ImageConvert\ImageConvert\obj\
?????目錄???????????0??2011-10-27?14:41??ImageConvert\ImageConvert\obj\Debug\
?????文件??????162428??2011-04-16?11:51??ImageConvert\ImageConvert\obj\Debug\ImageConvert.FormMain.resources
?????文件?????????180??2011-04-16?11:51??ImageConvert\ImageConvert\obj\Debug\ImageConvert.Properties.Resources.resources
?????文件?????????845??2011-04-16?11:51??ImageConvert\ImageConvert\obj\Debug\ImageConvert.csproj.GenerateResource.Cache
?????目錄???????????0??2013-09-12?21:52??ImageConvert\ImageConvert\obj\Debug\TempPE\
?????文件????????2251??2011-06-27?09:41??ImageConvert\ImageConvert\obj\ImageConvert.csproj.FileListAbsolute.txt
?????目錄???????????0??2013-09-12?20:47??ImageConvert\ImageConvert\obj\Release\
?????文件?????????789??2013-09-12?20:29??ImageConvert\ImageConvert\obj\Release\DesignTimeResolveAssemblyReferences.cache
............此處省略13個文件信息

評論

共有 條評論