Pngyu可以批量地将PNG32格式的图片文件转存为PNG8格式,而且它会使用一套图片压缩算法,使得转换后的图片质量失真不是那么严重。最重要的是,转换后的图片文件大小只有转换前的35%左右,这是相当可观的。
2022-10-25 18:08:26 10.09MB png 图片处理
1
图片压缩工具,压缩率大概%80左右,原来的文件1G压缩后200M左右,具体根据图片情况而定
2021-12-21 12:09:44 334KB 图片压缩 图片 jpg 无损压缩
1
Png RGBA转换成RGB+palette 格式转换。有需要的可以试试。
2021-07-17 15:44:54 57KB png图片压缩
1
png格式图片批量压缩工具,解压后直接把两个文件copy到资源目录下,运行.bat即可压缩该目录及子目录下的所有png文件
2021-06-21 18:14:41 204KB png图片压缩工具
1
用于优化压缩PNG格式图片的体积,它们能在不改变图片分辨率且尽量不损耗清晰度的前提下让图片文件体积变得更小,以便在网络中传输得以加快。
2021-06-16 19:05:34 6.73MB png图片 压缩
1
在Startup.cs文件中配置Pngquant所在路径 public void ConfigureServices(IServiceCollection services) { if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { var pngquant = Configuration.GetSection("PngquantPathLinux").Value; PngquantConfig.Configure(new PngquantOptions { BinaryFolder = pngquant }); } if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { var pngquant = Configuration.GetSection("PngquantPathWin").Value; PngquantConfig.Configure(new PngquantOptions { BinaryFolder = pngquant }); } } 使用: FileStream fs = new FileStream(filePath, FileMode.Open); byte[] byData = new byte[fs.Length]; //设置压缩选项 var options = new PngQuantOptions() { QualityMinMax = (65, 80), //Minimum = 65, Maximum = 80. Default null Speed = 1, //Value between 1 and 11. default 3. IEBug = false, //Attempt to fix iebug. default false. Bit = 256 //bit-rate. default 256 }; ///Invoke the compressor Compressor pngQuant = new PngQuant(options); //Compress bytes byte[] compressed = await pngQuant.Compress(byData); MemoryStream ms = new MemoryStream(compressed); //把那个byte[] 数组传进去, 然后 using (FileStream fs = new FileStream(savePath, FileMode.Create, FileAccess.Write)) ms.WriteTo(fs);
2021-04-29 01:38:23 64KB Pngquant C# .netcore
1