Jump to content

Opening files by reference


Recommended Posts

1 hour ago, otuncelli said:

This is only possible (not exactly but very close) with a file type plugin. You can develop one for your own needs,

 

Or use this plugin maybe? (each layer is a reference to an image in the zip archive):

 

 

 

I don't think that's what @MW001means :)

 

Images are always opened "by value" (by copy) in Paint.NET. You can't have a PDN image that encodes something like, "layer 4 is actually sourced from ThisOtherFile.png" or whatever.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

As @otuncellisaid, a file type plugin may do this if you do not care about the memory size while the 'file' is loaded in paint.net.

 

So define your on file type plugin REFI' and use a text file with the extension .refi to store the image references.

There should be a specification describing the REFI file format. I.e.

 

REFI specification:

REFI files are text files using UTF-8 character set. Line separator should be CR LF.

The first line must start with the signature #REFI#. Characters after the signature will be ignored.

Lines starting with # are comment lines.

Lines not starting with # describing layers (in the order bottom layer to top layer).

The syntax of a layer line is: layername,visible,blendmode,opcity

where

  'layername' is the fullpathname of the referenced image embedded in double quotes

  'visible' can be true or false

  'blendmode' is one of the layer blendmodes (i.e. normal) Ilist of amodes)llowed

  'opacity' is an integer in the range 0..255.

 

#REFI#
"c:\myimage\file1.png", true, normal, 255
"c:\myimage\file2.jpg", false, normal, 128

 

Load and save are easy to implement (assuming you restrict the allowed file types to simple ones).

 

BUT

I would expect that Rick says no. Because you are not just writing to the provided output stream. Cancel or errors during save are difficult to handle. You may destroy the original images.

 

 

 

 

 

 

 

midoras signature.gif

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.

Guest
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.

 Share

×
×
  • Create New...