Not sure, but it seems there's an issue on how the "Trim to Current Layer" behaves. Canvas sizes increase in some circumstances (please, see also the video in comment below): Case example: - New document (single layer) > Trim to Current Layer = No problem - New document (single layer) > Fill with Foreground Color > Trim to Current Layer = Canvas sizes increase a bit. Ubuntu 14.04 Unity - Krita 2.9 Beta 3 (git 38ed8ff) Reproducible: Always Steps to Reproduce: 1. New document (with one layer) 2. Edit > Fill with Foreground Color 3. Image > Trim to Current Layer Actual Results: Canvas sizes increase a bit.
Created attachment 91011 [details] "Trim to Current Layer" increases canvas size - Video
Hi, mvowada! Could you please send me a test file? I'm afraid I cannot reproduce the problem here :(
Oh, I actually didn't have any trouble reproducing. It's not something that you can reproduce from a file, it happens even with the default 1600x1200 dimensions.
Created attachment 91108 [details] Thank you for feedbacks. Please, see the image in attachment for the settings I'm using for testing. I'm able to reproduce by deleting the second layer, filling the background layer and trimming.
Yes, got it, thank you! :)
Git commit 5f55698bc1867b9e7c7a082d33bd6661cad25d30 by Dmitry Kazakov. Committed on 18/02/2015 at 07:27. Pushed by dkazakov into branch 'calligra/2.9'. Fix "Trim to current layer" not to use extents() in non-transparent layers We should calculate real non-default pixel area instead M +38 -10 krita/image/kis_paint_device.cc M +22 -3 krita/image/kis_paint_device.h M +9 -1 krita/ui/kis_layer_manager.cc http://commits.kde.org/calligra/5f55698bc1867b9e7c7a082d33bd6661cad25d30
Maybe there's something wrong on my settings. Unfortunately I'm still able to reproduce the problem. I'm on Ubuntu 14.04 Unity: Qt: 4.8.6 KDE Development Platform: 4.13.3 Krita: 2.9 Beta 3 (git 5f55698) My steps: 1. I've created a new document with 2 layer 2. deleted the second layer (transparent), the higher in the stack 3. Shift+Backspace to repaint the background layer 4. Image > Trim to current layer
Created attachment 91150 [details] "Trim to Current Layer" increases canvas size - Video after rebuild
I'm sorry -- but this still happens for me as well. It's really simple to reproduce here: create a new image with one layer, click the fill tool, fill, select trim to current layer, and suddenly there's a transparent strip on the bottom of the image, 16 pixels high -- and my 1600x1200 image has become 1600x1216.
Git commit ce9d79cf48ce664ef9a3487cc5187eb088ef2a8e by Dmitry Kazakov. Committed on 21/02/2015 at 20:28. Pushed by dkazakov into branch 'calligra/2.9'. Fix KisPaintDevice::nonDefaultPixelArea() not care about opacity nonDefaultPixelArea() returns just a an area of non-default pixels, it shouldn't bother about opacity or stuff. M +1 -0 krita/image/kis_default_bounds.h M +74 -24 krita/image/kis_paint_device.cc M +48 -10 krita/image/tests/kis_paint_device_test.cpp M +1 -0 krita/image/tests/kis_paint_device_test.h http://commits.kde.org/calligra/ce9d79cf48ce664ef9a3487cc5187eb088ef2a8e
Created attachment 91323 [details] Sorry, but it seems the problem is still present. This attachment is a new video with the steps to reproduce the issue - Tested with Krita: 2.9.0 (git bc0a3ce)
Git commit efc662e6bd297904588c277f9619f681bc0a7ba4 by Dmitry Kazakov. Committed on 06/07/2015 at 14:41. Pushed by dkazakov into branch 'calligra/2.9'. Change exactBounds() to handle non-transparent default pixel properly Now the semantics of exactBounds() has changed. In the case when the default pixel is not fully transparent, now we do not return the extent of the device. Instead, we return either the image bounds value, or (if the device is bigger than the image) device's nonDefaultPixelArea(). Technically it looks like a union (defaultBounds()->bounds() | nonDefaultPixelArea()). This fixes a bug when exactBounds() were gradually growing during the merge operations in: M +6 -6 krita/image/kis_image.cc M +0 -1 krita/image/kis_image.h M +45 -27 krita/image/kis_paint_device.cc M +3 -2 krita/image/kis_paint_device.h M +40 -0 krita/image/tests/kis_paint_device_test.cpp M +1 -0 krita/image/tests/kis_paint_device_test.h http://commits.kde.org/calligra/efc662e6bd297904588c277f9619f681bc0a7ba4