简体   繁体   English

Basic4Android PNG压缩

[英]Basic4Android PNG compression

Android seems to visibly reduce the quality of PNG files at compile time. Android似乎在编译时明显降低了PNG文件的质量。

I have an aplication working with a canvas object. 我有一个使用画布对象的应用程序。 The process writes canvas data over a PNG file which has smaller dimensions than the canvas. 该过程将画布数据写入尺寸小于画布的PNG文件中。 Writing process repeats according to user events more than once (maybe 20 times according to user). 根据用户事件多次重复写入过程(根据用户可能重复20次)。 But after every writing process, image quality becomes worse and worse.It becomes pixelated. 但是在每个写入过程之后,图像质量变得越来越差,变得像素化。

Is there any way to turn off or disable compression for this? 有什么办法可以为此关闭或禁用压缩吗?

EditingPartMutable_Bitmap.WriteToStream(out, 100, "PNG")
'quality = 100 didn't worked either

Any idea? 任何想法?

PNG is a lossless format and as such the quality setting is ignored. PNG是一种无损格式,因此质量设置将被忽略。 The pixelated effect you are getting must be due to another reason. 您获得的像素化效果一定是由于其他原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM