I need to rotate a lot of pictures so that they occupy the smallest area and fit into the atlas. Is there any plugin or tool for this?

I need to rotate a lot of pictures so that they occupy the smallest area and fit into the atlas. Is there any plugin or tool for this?

Hello @Alexander_Mel_nikov and welcome to the forum!
I don’t know of a plugin for this task, but I would open the pictures, each in its own layer, and rotate them via the Transform a Layer or a Selection Tool (that is a square with a dot in the middle) from Krita’s Toolbox layer by layer. The option to rotate is found in Krita’s Tool Options Docker tab below the Color Selector Docker tab, at least if you use the Krita default layout. You always have to select the layer first in the layer stack, then click on the layer (object) on the canvas, and then you can rotate that selected layer.
Or, as an alternative, open the pics all in their own layers as before and rotate them layer by layer via Layer → Transform → Rotate → Rotate Layer and I would define a shortcut for it via Settings → Configure Krita → Keyboard Shortcuts to reach the layer rotation dialog more easily.
Michelist
Edit: Grammar
Thanks, I know about Transform a Layer or a Selection. But I need to get the smallest area of the sprites by rotating them. And it’s too difficult to do manually with Transform a Layer or a Selection. This should be a tool that calculates the smallest square area of a sprite and rotates that sprite to that area.
There is specialized software for this in the clothing, metal and furniture industries. There may also be a need when it comes to handling large quantities of photos, as well as specialized software that serves this need. But that would mainly be about rectangular formats, whereas your example image only seems to be about the shapes on the individual images.
So I think that this is an absolutely unique request for a painting program like Krita. Or to put it another way, it is not a function that the broad masses, or even a small number of users, would need on a regular basis. You are the first user I know who has such a need.
This means that if you need something like this, you would have to write it yourself. The advantage of Krita is that, if you know Python, you can write extensions for Krita relatively easily.
Another possibility would be to make a feature request, but whether this will find enough supporters is the question. So do it yourself would certainly be the quickest option.
Michelist
Sounds you have a packing problem, a common assignment in computer science and math class. I’m not aware of any plug-ins for Krita that can solve this (especially since these problems are also commonly hard to solve) but that’s just because Krita is mostly for painting and not for things like this. A software for layouting is perhaps able to do this because I can imagine in that field this is a common use case.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.