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

  • 大小: 0.28M
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發布日期: 2024-05-02
  • 語言: C#
  • 標簽: 壓縮??C#??圖片??

資源簡介


資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.IO;
using?System.Collections;
using?System.Drawing.Imaging;
using?System.Drawing.Drawing2D;
using?System.Threading;
namespace?CompressImg
{
????public?partial?class?Frm_Main?:?Form
????{
????????public?Frm_Main()
????????{
????????????InitializeComponent();
????????}
????????string?ImgPath?=?““;
????????ArrayList?Mary?=?new?ArrayList();
????????string?ImgSavePath?=?““;
????????Image?ig?=?null;
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????CheckForIllegalCrossThreadCalls?=?false;
?????????????
????????}

????????///?
????????///?無損圖片縮放
????????///?

????????///?圖片的原始路徑
????????///?縮放后圖片的保存路徑
????????///?縮放后圖片的高度
????????///?縮放后圖片的寬度
????????///?
??????????????????????
????????public??bool?GetPicThumbnail(string?sFile?string?dFile?int?dHeight?int?dWidth)
????????{
????????????Image?iSource?=?Image.FromFile(sFile);
????????????ImageFormat?tFormat?=?iSource.RawFormat;
????????????int?sW?=?0?sH?=?0;
????????????//?按比例縮放
????????????Size?tem_size?=?new?Size(iSource.WidthiSource.Height);
????????????if?(tem_size.Height>?dHeight?||?tem_size.Width>?dWidth)
????????????{
????????????????if?((tem_size.Width?*?dHeight)?>?(tem_size.Height?*?dWidth))
????????????????{
????????????????????sW?=?dWidth;
????????????????????sH?=?(dWidth?*?tem_size.Height)?/?tem_size.Width;
????????????????}
????????????????else
????????????????{
????????????????????sH?=?dHeight;
????????????????????sW?=?(tem_size.Width?*?dHeight)?/?tem_size.Height;
????????????????}
????????????}
????????????else
????????????{
????????????????sW?=?tem_size.Width;
????????????????sH?=?tem_size.Height;
????????????}
????????????Bitmap?oB?=?new?Bitmap(dWidth?dHeight);
????????????Graphics?g?=?Graphics.FromImage(oB);
????????????g.Clear(Color.WhiteSmoke);
????????????//?設置畫布的描繪質量
????????????g.CompositingQuality?=?CompositingQuality.HighQuality;
????????????g.SmoothingMode?=?SmoothingMode.HighQuality;
????????????g.InterpolationMode?=?InterpolationMode.HighQualityBicubic;
????????????g.DrawImage(iSource?new?Rectangle((dWidth?-?sW)?/?2?(dHeight?-?sH)?/?2?sW?sH)?0?0?iSource.Width?iSource.Height?GraphicsUnit.Pixel);
????????????g.Dispose();
????????????//?以下代碼為保存圖片時,設置壓縮質量
????????????EncoderParameters?eP?=?new?EncoderParameters();
????????????long[]?qy?=?new?long[1];
????????????qy[0]?=?100;
????????????EncoderParameter?eParam?=?new?EncoderParameter(System.Drawing.Imaging.Encoder.Quality?qy);
????????????eP.Param[0]?=?eParam;
????????????try
????????????{
????????????????//獲得包含有關內置圖像編碼解碼器的信息的ImageCodecInfo對象。
????????????????Ima

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

????..A..H.?????36864??2017-10-10?09:44??CompressImg\.vs\CompressImg\v14\.suo

?????文件??????67646??2020-11-21?21:09??CompressImg\CompressImg\androzip_128px_1126105_easyicon.net.ico

?????文件?????????77??2019-11-08?09:33??CompressImg\CompressImg\app.config

?????文件??????67646??2020-11-21?20:50??CompressImg\CompressImg\bin\Debug\androzip_128px_1126105_easyicon.net.ico

?????文件?????202240??2020-12-27?13:56??CompressImg\CompressImg\bin\Debug\CompressImg.exe

?????文件??????????0??2020-11-21?21:34??CompressImg\CompressImg\bin\Debug\CompressImg.exe.CodeAnalysisLog.xml

?????文件??????32256??2020-12-27?13:56??CompressImg\CompressImg\bin\Debug\CompressImg.pdb

?????文件??????14328??2010-07-08?16:34??CompressImg\CompressImg\bin\Debug\CompressImg.vshost.exe

?????文件????????490??2009-06-11?05:14??CompressImg\CompressImg\bin\Debug\CompressImg.vshost.exe.manifest

?????文件??????25040??2020-11-21?21:01??CompressImg\CompressImg\bin\Debug\question_mark_481px_1291259_easyicon.net.png

?????文件???????4290??2020-11-21?21:09??CompressImg\CompressImg\CompressImg.csproj

?????文件????????477??2019-11-08?09:33??CompressImg\CompressImg\CompressImg.csproj.user

?????文件??????10161??2020-12-07?16:44??CompressImg\CompressImg\Frm_Main.cs

?????文件??????22528??2020-12-07?16:01??CompressImg\CompressImg\Frm_Main.Designer.cs

?????文件?????170893??2020-12-07?16:01??CompressImg\CompressImg\Frm_Main.resx

?????文件??????10198??2020-12-27?13:56??CompressImg\CompressImg\obj\Debug\CompressImg.csproj.FileListAbsolute.txt

?????文件????????889??2020-12-27?13:56??CompressImg\CompressImg\obj\Debug\CompressImg.csproj.GenerateResource.Cache

?????文件?????202240??2020-12-27?13:56??CompressImg\CompressImg\obj\Debug\CompressImg.exe

?????文件????????180??2008-12-27?10:40??CompressImg\CompressImg\obj\Debug\CompressImg.Form1.resources

?????文件?????110426??2020-12-27?13:56??CompressImg\CompressImg\obj\Debug\CompressImg.Frm_Main.resources

?????文件??????32256??2020-12-27?13:56??CompressImg\CompressImg\obj\Debug\CompressImg.pdb

?????文件???????3597??2020-12-27?13:56??CompressImg\CompressImg\obj\Debug\CompressImg.Properties.Resources.resources

?????文件???????1371??2019-11-08?09:17??CompressImg\CompressImg\obj\Debug\DesignTimeResolveAssemblyReferences.cache

?????文件???????7365??2020-11-21?21:09??CompressImg\CompressImg\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

?????文件???????4608??2013-11-13?13:32??CompressImg\CompressImg\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

?????文件????????495??2020-11-16?16:30??CompressImg\CompressImg\Program.cs

?????文件???????1410??2019-11-08?09:43??CompressImg\CompressImg\Properties\AssemblyInfo.cs

?????文件???????3250??2013-11-13?13:32??CompressImg\CompressImg\Properties\Resources.Designer.cs

?????文件???????6207??2008-10-13?09:17??CompressImg\CompressImg\Properties\Resources.resx

?????文件???????1111??2013-11-13?13:32??CompressImg\CompressImg\Properties\Settings.Designer.cs

............此處省略20個文件信息

評論

共有 條評論