SUMMARY In my free time I've been working on animating very low resolution (16x16, 24x24, 32x32) pixel art game assets and I've found that I'm unable to use "Paste into Active Layer" to paste individual frames of animation when working on pixel art sized images. STEPS TO REPRODUCE 1. In one Krita document, create a 24 x 24 pixel image. 2. Select the entire canvas and copy it to your clipboard. 3. Now create another 24 x 24 document. 4. In this new 24 x 24 document, try the `Edit > Paste into active layer` action. OBSERVED RESULT I've found that the image fails to be pasted onto the active layer. And if you select the Transform Tool you'll see a message telling you that you can't transform an empty layer, confirming that nothing has been pasted on or off the canvas. EXPECTED RESULT I would like to see the contents of my clipboard be pasted onto the active layer (and active animation frame), preferably in the most logical position on the canvas possible, for example aligned with the upper-left corner of the canvas.
Actually it seems like I can only reproduce this when pasting into Krita from another program. So I need to correct the steps to reproduce reliably using a second program. UPDATED STEPS TO REPRODUCE 1. In another program (I've been using Aseprite, but other FOSS options like Pixelorama or LibreSprite should be similar), create a 24 x 24 pixel image. 2. Select the entire canvas (in the source program) and copy it to your clipboard. 3. Now create another 24 x 24 document. 4. In this new 24 x 24 document, try the `Edit > Paste into active layer` action. (I should say I believe I've had this problem copying pixel art between Krita files in the past, but I was unable to reliably reproduce it just now without getting a second program involved. *shrug*.)
Created attachment 162182 [details] Video: krita -> krita paste into active layer fails. Update: Ok, it turns out that this *does* happen between 2 krita documents, though I'm not sure exactly how to reproduce it. In this case I have a bunch of 24 x 24 sprites packed onto a single sprite sheet, and for some reason I can't copy and paste them into the active layer on my other 24 x 24 document. (Video attached.)
I believe there are two issues here: 1) "paste into active layer" from a raw image source (like another program's "Copy") does not work seemingly at all. this is an easy fix. 2) tentative STR: 2.1) make a new biggish image 2.2) draw something in the bottom right 2.3) select and copy a small region in thing you drew 2.4) create a second image, smaller in size 2.5) paste into active layer -> canvas does not change, but the preview in the layer docker does
my attempt to fix both issues: https://invent.kde.org/graphics/krita/-/merge_requests/1956
Git commit 31163c43eacf92c6796668dfbf555f3f88707b24 by Emmet O'Neill, on behalf of Simon Ra. Committed on 16/10/2023 at 23:46. Pushed by emmetoneill into branch 'master'. fix two bugs related to pasting image data into krita, along with some refactoring: 1) "Paste into active layer" not working with non-krita MIME type paste data 2) all types of pastes not correctly detecting when the pasted content is outside of the bounds of the canvas being pasted into M +16 -16 libs/ui/actions/KisPasteActionFactories.cpp https://invent.kde.org/graphics/krita/-/commit/31163c43eacf92c6796668dfbf555f3f88707b24
Git commit 3bbc62a905a015bcee30a165ae86bc136abd6c60 by Emmet O'Neill, on behalf of Simon Ra. Committed on 17/10/2023 at 22:40. Pushed by emmetoneill into branch 'krita/5.2'. fix two bugs related to pasting image data into krita, along with some refactoring: 1) "Paste into active layer" not working with non-krita MIME type paste data 2) all types of pastes not correctly detecting when the pasted content is outside of the bounds of the canvas being pasted into (cherry picked from commit 31163c43eacf92c6796668dfbf555f3f88707b24) M +16 -16 libs/ui/actions/KisPasteActionFactories.cpp https://invent.kde.org/graphics/krita/-/commit/3bbc62a905a015bcee30a165ae86bc136abd6c60