Closed LazyIonEs closed 3 months ago
What version of fast_image_resize are you using?
What version of fast_image_resize are you using?
4.0.0
This is a known disadvantage of such filters (bicubic filters, lanczos3). This effect is called "ringing" (ghost-borders). You may use one of bilinear filters if this effect is not appropriate for you.
I don't know why in the "resize" crate this effect is almost invisible for RGBA images. But for images without alpha channel this effect is the same as for the fast_image_resize.
我参考了squoosh中resize
的调用,当我启用了premultiply
和color_space_conversion
,所得到的结果非常的好,比较符合我的需求,但是相比于reszie
,我更想使用fast_image_resize
,因为这对于我这个新手来说简单很多,是个很不错的开源库,我不知道这对你是否有帮助。我会尝试其他的过滤器,看看能不能达到我想要的效果
I referred to the call of resize
in squoosh. When I enabled premultiply
and color_space_conversion
, the results were very good and more in line with my needs. However, compared to reszie
, I would rather use fast_image_resize
because it is much simpler for a novice like me and is a very good open source library. I don't know if this is helpful to you. I will try other filters to see if I can achieve the effect I want.
squoosh - resize
fast_image_resize
我尝试使用了fast_image_resize
中的Mitchell
和CatmullRom
,他们也出现了你所说的"ringing",这个结果对我来说很不好,对于"ringing",Mitchell
相比于CatmullRom
来说要少很多
I tried using Mitchell
and CatmullRom
in fast_image_resize
, and they also had the "ringing" you mentioned. This result is not good for me. Mitchell
has much less "ringing" than CatmullRom
.
Mitchell
CatmullRom
Mitchel and CatmulRom are bicubic filters, they also have this effect.
Mitchel and CatmulRom are bicubic filters, they also have this effect.
Yes, I misunderstood what you meant. I used Bilinear
for testing, but the clarity is not as good as Lanczos3
, which may not meet my needs. Thank you.
If this problem cannot be solved, should this issue be closed?
No, this is a known property of such filters. You may use bilinear filters or make yoursefl custom filter. There is no the one good filter for all cases. You have to choose filter for particular case.
No, this is a known property of such filters. You may use bilinear filters or make yoursefl custom filter. There is no the one good filter for all cases. You have to choose filter for particular case.
好的,谢谢 OK, thanks
我通过
resizer.resize
方法将此512512的图片缩放到192192,缩放算法使用了Lanczos3
,缩放后的图片四角出现了与原图不一致的颜色,我在使用resize时,同样适用了Lanczos3
,但并没有这个情况,麻烦看一下这个是什么原因I scaled this 512512 image to 192192 using the
resizer.resize
method. The scaling algorithm usedLanczos3
. The four corners of the scaled image had inconsistent colors with the original image. When I used resize, I also appliedLanczos3
, but this problem did not occur. Please take a look at what is the reason与原图对比 - Compare with original image
缩放之前 - Before scaling
缩放之后 - After scaling