To reproduce: ============= 1. Open https://www.peppercarrot.com/extras/forum/256x256_base-canvas.png in Krita. 2. Download https://www.peppercarrot.com/extras/forum/128x128_overlay-center.png on disk 3. Drag'n'Drop 128x128_overlay-center.png over the canvas (256x256_base-canvas.png) and "Insert as a New File Layer" 4. Open the Layer properties(right click on layer>Properties) 5. Select "Scale to Image Size" Result ====== The 128x128 picture doesn't strecht to the 256x256 image. It even transform without any reason into a 512x512px File Layer. Interesting fact: if you take a picture without opacity like https://www.peppercarrot.com/extras/forum/128x128_overlay.png ; Krita upscale the picture correctly.
Hm, here it does scale to 256x256, but it is placed with the top-level corner in the center of the image after setting the scale to image size option.
Here I have this result after scaling: https://www.peppercarrot.com/extras/temp/2018-07-11_screenshot_094840_net.jpg If I move it/recenter it: https://www.peppercarrot.com/extras/temp/2018-07-11_screenshot_094945_net.jpg It looks like Krita autocrop the transparent pixels around the original 128x128 and then upscale the obtained new geometry (the central part) to 256x256, and also move a top-left corner to centerX and centerY of the canvas. Expected would be: https://www.peppercarrot.com/extras/temp/2018-07-11_screenshot_095056_net.jpg ...to respect the transparent padding around the original 128x128 picture.
Created attachment 114823 [details] Video Hi, in my case, I'm getting the same behaviour as David (see video - Krita Appimage 4.2.0-pre-alpha (git 65a1598) - Ubuntu 14.04, Unity).
Git commit 9f4810685ded1d9ee1ac0b654416d7c61b56c42f by Dmitry Kazakov. Committed on 13/08/2020 at 13:56. Pushed by dkazakov into branch 'krita/4.3'. Fix scaling of file layers with transparent background For upscaling/downscaling the image we should use its physical size saved in the original file, not just the bounding rect calculated with exactBounds(). This patch may change the look of existing .kra files, but we can consider this case inexistent, because the offset of transparent file layers has always been calculated incorrectly. I don't think anyone could use the feature for transparent layers because of that. CC:kimageshop@kde.org M +9 -7 libs/ui/kis_file_layer.cpp M +1 -1 libs/ui/kis_file_layer.h M +4 -1 libs/ui/kis_safe_document_loader.cpp M +1 -1 libs/ui/kis_safe_document_loader.h https://invent.kde.org/graphics/krita/commit/9f4810685ded1d9ee1ac0b654416d7c61b56c42f
Git commit ab91d8ee40021a5ce35d4da40191a545996f281e by Dmitry Kazakov. Committed on 13/08/2020 at 13:59. Pushed by dkazakov into branch 'master'. Fix scaling of file layers with transparent background For upscaling/downscaling the image we should use its physical size saved in the original file, not just the bounding rect calculated with exactBounds(). This patch may change the look of existing .kra files, but we can consider this case inexistent, because the offset of transparent file layers has always been calculated incorrectly. I don't think anyone could use the feature for transparent layers because of that. CC:kimageshop@kde.org M +9 -7 libs/ui/kis_file_layer.cpp M +1 -1 libs/ui/kis_file_layer.h M +4 -1 libs/ui/kis_safe_document_loader.cpp M +1 -1 libs/ui/kis_safe_document_loader.h https://invent.kde.org/graphics/krita/commit/ab91d8ee40021a5ce35d4da40191a545996f281e