From 47a568ee86a839c3548df5e6709dbbb544b08615 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 7 Feb 2020 15:11:03 -0300 Subject: [PATCH] Resize selection correctly on "Sprite Size" even when the Bilinear method is used --- src/app/commands/cmd_sprite_size.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/commands/cmd_sprite_size.cpp b/src/app/commands/cmd_sprite_size.cpp index 4b2dd3f69..cd9b9c37a 100644 --- a/src/app/commands/cmd_sprite_size.cpp +++ b/src/app/commands/cmd_sprite_size.cpp @@ -130,9 +130,12 @@ protected: gfx::Rect( scale_x(document()->mask()->bounds().x-1), scale_y(document()->mask()->bounds().y-1), MAX(1, w), MAX(1, h))); + + // Always use the nearest-neighbor method to resize the bitmap + // mask. algorithm::resize_image( old_bitmap.get(), new_mask->bitmap(), - m_resize_method, + doc::algorithm::RESIZE_METHOD_NEAREST_NEIGHBOR, sprite()->palette(0), // Ignored sprite()->rgbMap(0), // Ignored -1); // Ignored