Crop file layer

Hi everyone,

Does anyone know if there is any way to crop a file layer? As far as I can tell, if you select a file layer the only option available for “Applies to” is “image”.

Also (though a bit of a longshot), is there a way to do this in a non-destructive way, i.e. similar to what the transform mask does for transforms? I’m using Blender to render some rough backgrounds which I then import as a file layer and draw over. Cropping the rendered Blender file is a dissatisfactory option, as I often need/want to revisit the Blender scene and modify something (often weeks later) and it is extremely difficult to get consistent crops by hand after every render.

When I remember correctly file layers are basically as-is since they represent the whole file. But you could still attach a transparency mask to it that mask out everything you don’t need, the stuff you would have cropped away.

The file layer brings in the .png image which is stored in the .kra file and this is a one way process. The resulting layer is effectively read-only.
You can crop it but that crop only applies to the total image you’re working on and does not affect the contents of the external .kra file or the file layer image itself. (You can see this if you do a crop followed by a resize.)

As noted above by @Takiro, you can put a transpareny mask on it or do any kind of non-destructive change to it (filter mask, transform mask).

Thanks @Takiro and @AhabGreybeard, it’s not what I had in mind originally, but it does get the job done :smiley:

I was just going to suggest an alternative method, using alpha inheritance - then tried in Krita and realised that this does not work with file layer. However, there’s a workaround by putting the file layer into a group of its own. So the method goes like this:

  1. select file layer, create group (ctrl+G) and enable ‘inherit alpha’
  2. create vector layer below that group (not within!)
  3. group the “file-group” with the vector layer

Now whatever shape you put on the vector layer will be like a “window” into the file layer. While this seems like a lot of work initially, it does offer a lot of flexibility in editing crop size and shape non-destructively.

2 Likes

That’s actually a very convenient solution! I should have thought of this, I already use the same thing to draw on panels.

The only problem is that groups with file layers cause insane lags whenever you need to modify something in the group (e.g. reorder the layers). I was left waiting about a minute before Krita finished moving the vector layer below the file layer :grimacing:. Still, I need to do this infrequently enough that it’s not a deal breaker.

Thanks!

Hm… I’m not seeing that here. I just tried and even made a couple nested folders. Moving the vector layer or the file layer around, moving in and out of the group(s) happens pretty much instantly.

Does this happen in a new project with just the minimum layers and groups needed? What’s your system? Mine is Win7-64 running Krita 4.4.3

I’m on Ubuntu with 32GB RAM, running Krita 4.4.1. Unfortunately versions from 4.4.2 onwatd have a dealbreaker bug (for me) and I can’t upgrade for now.

Groups with file layers have always been extremely laggy for me, so I tended to avoid them if possible. That said, I’m working on templates with quite a few layers and nested groups, so that may have an effect. It’s definitely worth investigating on a fresh file to see if I still get that lag or not.

What is the dealbreaker bug that 4.4.2 onwards have?

If you’re not using the appimage, can you try it from here:
Krita Desktop | Krita

This one: 431945 – Comics Manager memory leak in Krita 4.4.2
Effectively, if I load a comic project, I almost run out of RAM in newer versions. Unfortunately that happens with the appimages as well :frowning:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.