简体   繁体   English

如何防止在调整大小时应用模糊滤镜图像?

[英]How can I prevent from applying blur Filter Image on resize?

I am trying to resize an image in my app. 我正在尝试调整应用程序中图像的大小。 The issue is that Android automatically applies a filter that blurs the pixels. 问题是Android会自动应用模糊像素的滤镜。 How can I prevent that from happening and instead see the Individual Pixels. 如何防止这种情况发生,而是查看单个像素。 As in Pixelated. 如像素化。 Im using the ValueAnimator to increase the size of RelativeLayout that has an image set as Background. 我使用ValueAnimator来增加将图像设置为Background的RelativeLayout的大小。

ValueAnimator animator = ValueAnimator.ofInt(2000, 200000);
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
    @Override
    public void onAnimationUpdate(ValueAnimator valueAnimator) {

        int state = (Integer) valueAnimator.getAnimatedValue();
        screenX = state;
        screenY = state;

        myContent.setLayoutParams(new FrameLayout.LayoutParams(screenX, screenY));

    }
});
animator.setDuration(2000);
animator.start();

Example of What I mean 我的意思的例子

在此处输入图片说明

Hey guys after searching for a while I found a solution to this. 搜寻了一阵子之后,我找到了解决方案。

http://www.41post.com/4241/programming/android-disabling-anti-aliasing-for-pixel-art http://www.41post.com/4241/programming/android-disabling-anti-aliasing-for-pixel-art

The word I was missing that would have helped me find an answer faster was Anti-Aliasing which has to be dissabled 我想念的可以帮助我更快找到答案的词是抗锯齿,必须禁用

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

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