Jump to content

Feature Request: Auto Name Layer with Image File Name

Recommended Posts

First, thanks for a great app! I use it every day. Quite happy for it!

Something that would save me (and others?) a bit of time has to do with layer names. When I open an image file, Paint.net names it "background" in the layers window. two issues with this.

1) Typically, the png image I open has no background. So each time I plan to work with several layers, I either need to think of something creative to call my actual background layer, or rename the layer with the original png image. Not a super hassle, but a nuisance. Go ahead, call me picky.  

2) (and more of an actual problem) I often work on more than one image at once. Each might have several layers. If the original image were identified by its file name, I could more easily tell at a glance which image/layer I was working on as I ctrl+tab my way from one image to another. 



Link to comment
Share on other sites

The problem here is the dev doesn't know when the user saves the file. Until it gets saved, the layer can't be changed to match. In order for this behavior to work, paint.net would have to track which layer is the original layer and if its name has ever been changed, because the only layer safe to rename is the original, and it can't be renamed if it's deleted or renamed by the user. Some other things to consider are how it handles special characters in filenames and long filenames, how this behaves if the user renames their save file or performs Save As, and how it interacts with conflicting future features e.g. having a custom "new document" with whatever settings the user wants.


Definitely doable, but not sure if it's worth the effort. Rick generally has enough on his plate right now, so it probably won't happen or at least no time soon. Thanks for raising a suggestion, though.

Link to comment
Share on other sites

@NinthDesertDude, I think the OP is wanting the name of the layer to match the filename when the user activates the "Layer > Import from file" menu.


Currently, it names the layer "filename: Background" where filename doesn't have the filetype extension.

Click to play:
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to comment
Share on other sites

16 minutes ago, BoltBait said:

I think the OP is wanting the name of the layer to match the filename when the user activates the "Layer > Import from file" menu.


I think the OP asking for the image file name to be used as the layer name when opening a single layer image.


Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait


Link to comment
Share on other sites

^ That's what I thought too.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...