[使用Lua和Love 2d,我想用像素调整图像大小:
img = love.graphics.newImage("assets/bg.png")
-- resize the image (500 x 400)
function love.draw()
love.graphics.draw(bg, 0, 0)
end
[我了解的是,您希望以pixelart样式缩放图像,并且不希望出现这种模糊效果,可以在使用love.graphics.newImage(path)加载图像之前,将默认滤镜设置为最近的。
love.graphics.setDefaultFilter("nearest", "nearest") love.graphics.newImage(path) love.graphics.setDefaultFilter("linear", "linear") --[[ If you want to let the filter like before ]]
我建议您访问love2d论坛。如果这不起作用,请访问this forum