Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Slick 库(基于 LWJGL)中,您可以在加载图像后缩放图像getScaledCopy,但它会应用抗锯齿。我希望边缘保持粗糙;我正在制作像素艺术。我怎样才能做到这一点?
getScaledCopy
根据评论:
该文档暗示 s 的filter属性Image控制图像的缩放方式。要在不平滑的情况下缩放图像,请使用最近邻滤波器:
filter
Image
Image original = …; original.setFilter(Image.FILTER_NEAREST); Image scaled = original.getScaledCopy();