Use Lanczos filtering for variable-sized images such as project icons
This results in better-looking icons with less artifacts induced by downscaling.
This commit is contained in:
@@ -1109,7 +1109,7 @@ void ProjectList::load_project_icon(int p_index) {
|
||||
Error err = img->load(item.icon.replace_first("res://", item.path + "/"));
|
||||
if (err == OK) {
|
||||
|
||||
img->resize(default_icon->get_width(), default_icon->get_height());
|
||||
img->resize(default_icon->get_width(), default_icon->get_height(), Image::INTERPOLATE_LANCZOS);
|
||||
Ref<ImageTexture> it = memnew(ImageTexture);
|
||||
it->create_from_image(img);
|
||||
icon = it;
|
||||
|
||||
Reference in New Issue
Block a user