[英]HTML5 Canvas image crop, resize, and save without losing quality
But when I scale that image it loses its quality.. 但是当我缩放该图像时,它会失去质量。
How can I scale image without losing its quality? 如何缩放图像而又不损失其质量?
The steps which I performed are 我执行的步骤是
The simple answer is that you can't.. 简单的答案是你不能..
The image, when scaled, is interpolated. 缩放后对图像进行插值。 If the source image is of low quality (as in this video snapshot) the result will be at best equal, but never better without some complex processing.
如果源图像的质量较低(如此视频快照中所示),则结果最多将是相等的,但如果不进行某些复杂的处理,则永远不会更好。
In this case the video snapshot is heavily compressed so you get a blocky image (a result of MPEG compression) which is not so apparent at the original size but becomes evident when scaled (you just see the artifacts better as they too are scaled). 在这种情况下,视频快照会被大量压缩,因此您会得到一个块状图像(MPEG压缩的结果),该图像在原始大小下不那么明显,但是在缩放后变得明显(您可以更好地看到这些伪像,因为它们也在缩放)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.