Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q25:当放大倍数大于等于2时,出现报错 #48

Open
thgpddl opened this issue Jul 14, 2021 · 0 comments
Open

Q25:当放大倍数大于等于2时,出现报错 #48

thgpddl opened this issue Jul 14, 2021 · 0 comments

Comments

@thgpddl
Copy link

thgpddl commented Jul 14, 2021

报错信息如下,原因是y代表的y坐标超过了原图(128*128)本身的大小
image

解决方案:由于是运算过程中产生可比如127.5最后向上(round)取整得到128,将向上取整改为向下取整(floor)可以解决

  • 向上取整:
    image

  • 向下取整:
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant