Jump to content

'ZIP Archive' FileType Plugin (.ZIP) [Latest v1.4 2021-11-04]


midora
 Share

Recommended Posts

 

'ZIP Archive' FileType Plugin (.ZIP)


Download

Find the latest version of the plugin here: ImZIP.FileType.v1.4.zip[2021-11-04]

 

Summary

Loads/saves the content of a Paint.NET document (layers and metadata) from/to a compressed ZIP Archive. Each layer will be a separate file in the archive (or if the tiling feature is used a set of files where each file contains one tile). Several formats for the layer files are supported: PNG, BMP, GIF, and JPEG. Additionally a thumbnail and a composite image can be stored in the archive.

Tiling of the image is possible. Save may chop up the layers into tiles and load will glue the tiles together to the original image.

This file format may be used

  • to export the layers to an other application in a standard format.
  • to zip the image if an upload location does not allow .pdn format.
  • as a replacement for the external Paint.NET tool LayerSaver

 

Keywords

FileType, ZIP, Archive, Save layers, Load Layers, Split layers, Tiles

 

Author / Copyright

Martin Osieka

2015-2021, Martin Osieka, Switzerland
You may use this plugin together with Paint.NET w/o any restriction.

 

Installation

Follow the instructions carefully

  • Copy the folder 'ImZIP.FileType' together with its content into FileTypes folder of paint.net
  • Remove other plugins supporting the same file type (.zip) from FileTypes folder (to avoid possible conflicts) I.e. 'TileImageFileType.dll' plugin.

To verify the installation you should restart Paint.NET and check that the filetype popup of the 'Open...' file dialog contains an entry starting with ZIP.

 

Compatibility

Paint.NET >= 4.3.2

 

Supported languages

The language used in the plugin depends on the language setting of Paint.NET and the support of this language by the plugin. The fallback is the first supported language of the plugin. Languages are defined in the .dlc files. This plugin supports the following languages in the moment:

  • English
  • Deutsch

 

'Save dialog' options

 

2021-11-04-Im-ZIP-File-Type-Save-Dialog-                                                       

  • Layer subset
    Select 'All layers', 'Visible layers', or 'Hidden layers'. If the resulting layer set is empty you will get an error message box. Just continue and select an other layer set.
  • Save formats of images
    The following formats are available in the moment
    • PNG 32-bit ARGB
    • BMP 32-bit ARGB
    • GIF 8-bit RGB opaque (loosy)
    • JPEG opaque (loosy)

Only PNG ARGB and BMP ARGB allow you to load the zip back in the original quality.
Because GIF and JPEG do not support an alpha channel, the layers will be rendered against a white background before saving. You can see this in the preview window.

  • Thumbnail (preview image)
    If checked then a file 'Thumbnail.png' will be added as the first entry to the zip. This allows shell extensions of Windows File Explorer to show a preview of the zip. A thumbnail is not required to restore the Paint.NET document.
  • Composite (flattened image)
    If checked then a file 'Composite.EXT' will be added to the zip. The extension depends on the selected image format. The composite has the same size as the layers. A composite is not required to restore the Paint.NET document.
  • Tiling of layers
    The layer content can be splited in square or rectangular tiles. Typically this is used on flattened images but it works on a layered image too. Decreasing the size of the tiles will slow down the processing and increase the number of files in the archive.

 

 

 

 

 

'Load dialog' options

None

 

ZIP file content

A ZIP file describing a Paint.NET v3 document may contain the following files:

  • 'PaintDotNet.txt'
    A txt file in UTF-8 format (starting with an UTF-8 BOM: 0xEF 0xBB 0xBF) In the moment the file just contains the signature text "PDN3" which means that the zip file describes a version 3 Paint.NET document completely.
  • 'Thumbnail.png'
    A 32-bit ARGB png image containing the composite image of the document scaled down to a maximum size of 256 x 256 pixels (respecting the aspect ratio). Thumbnail.png should be the first file in the zip archive to support shell viewers which show the first image in the zip file in Windows FileExplorer.
  • 'Composite.EXT'
    A composite (flattened) image in the requested image format.
  • 'L{id},R{row},C{column},{name},{visibility},{mode},{opacity}.EXT'
    All layers of the document are stored in the selected image format. The file name of a layer starts with the character 'L' and contains the following elements
    {id}: The decimal index of the layer in the range [1..Z]. 1 is the bottom layer. The  index may be preceded by '0' characters.
    {row}: The decimal index of the row in the range [1..Y].
    {column}: The decimal index of the column in the range [1..X].
    {name}: The name of the layer. Unicode letters and digits are used directly but all other characters will be replaced with their 32-bit hexcode preceded with the character %. I.e. a comma in the name will be replaced with %002C.
    {visibility}: may be 'visible' or 'hidden'
    {mode}: Is the blend mode of the layer in lowercase letters, I.e. 'normal'
    {opacity}: The opacity value of the layer in the range [0..255]. 255 is opaque.
    The loader checks all file names in the archive for the pattern L{z},R{y},C{x} sorts them and glues all tiles of a layer together.
    The image with id 'L1' defines width, height, and dpi value of the document.

 

Known issues

  • Paint.NET does not inform the filetype plugin that the save operation has  been aborted because the user changed a parameter of the dialog. This slows  down the time needed to compute the size of the file. So avoid to change the  parameters too fast.

 

History

  • 1.4 [2021-11-04]
    - Replaced ionic zip class with ZipArchive class
  • 1.3 [2021-11-02]
    - Modified to support paint.net 4.3 and .NETCore 5
  • 1.2 [2021-08-17]
    - Refactored. Added 'Layers subset' option
  • 1.0 [2015-07-08]
    - First public release

 

Edited by midora
  • Like 1
  • Upvote 8

midoras signature.gif

Link to comment
Share on other sites

  • 5 weeks later...

I'm a complete noob to plugins, but I followed the directions, and put the plugins where plugins usually go (In the effects folder right?) But it still doesn't work, I am using one of the versions its compatible with, version 4.0.5 but it still doesn't work. I mean, how do I get the option to show? Like save it as a regular .PNG file?

Basically what I'm asking is how do I use the plugin when I have it installed.

Link to comment
Share on other sites

Not quite.

Filetype plugins go in the \Filetypes\ folder, not \Effects\.

From the first post...

 

Follow the instructions carefully

  • Copy the two files 'ImZIP.FileType.dll/.dlc' to the Paint.NET\FileTypes\ folder
  • Remove other plugins supporting the same file type (.zip) from Paint.NET\FileTypes\ folder (to avoid possible conflicts) I.e. 'TileImageFileType.dll' plugin.
To verify the installation you should restart Paint.NET and check that the filetype popup of the 'Open...' file dialog contains an entry starting with ZIP.
Link to comment
Share on other sites

  • 2 months later...

Basically what I'm asking is how do I use the plugin when I have it installed.

When installed correctly,

Go up to the Menu Bar in paint.net > File > Save As > click the Save As Type drop down list > look for "ZIP - Compressed Archive of Layers (*.zip)", and then click "Save". The plugin's user interface should pop up.

Edited by Cc4FuzzyHuggles
Link to comment
Share on other sites

  • 4 weeks later...
  • 5 months later...
  • 2 years later...
  • 2 months later...
  • 1 month later...

Is it possible to prevent the layer names from being changed in the archive?

For example, in paint.net my first layer is "01". When I save it into an archive, I would like to keep it as "01", instead of "L3,R1,C1,01,visible,normal,255".

Link to comment
Share on other sites

  • 1 year later...

Sorry @Djisves, your idea is good but it has 2 problems:

  1. I have a many images and the computer crashed, processing one file at a time I suppose wouldn't have happened;
  2. also my files have different sizes, so all the extracted layers would have been the size of the biggest image.

Maybe I was explaining myself wrong. My intention was not only to convert to layers, but also to export them to png

Link to comment
Share on other sites

21 minutes ago, AP2020 said:

Sorry @Djisves, your idea is good but it has 2 problems:

  1. I have a many images and the computer crashed, processing one file at a time I suppose wouldn't have happened;
  2. also my files have different sizes, so all the extracted layers would have been the size of the biggest image.

Maybe I was explaining myself wrong. My intention was not only to convert to layers, but also to export them to png

 

Then you would need to use a batch processing software. Either ImageMagick or G'MIC would work. I could help you with G'MIC with a PM though.

 

Also, do report your bug to @Rick Brewster. I think the import layers to zip method to extract should work. If not, you always have the above method.

 

Edited by Reptillian

G'MIC Filter Developer

Link to comment
Share on other sites

  • 1 month later...
On 2/26/2021 at 4:20 PM, aworkerb said:

I just installed the files into the FileTypes folder but ZIP doesn't appear in the Open or Save As options. I'm on 4.2.15 -- anyone using it successfully with the latest version? 

 

Did you do these two steps.....?

 

Quote
  • Copy the two files 'ImZIP.FileType.dll/.dlc' to the Paint.NET\FileTypes\ folder
  • Remove other plugins supporting the same file type (.zip) from Paint.NET\FileTypes\ folder (to avoid possible conflicts) I.e. 'TileImageFileType.dll' plugin.

 

If you did, post a screenshot of your FileTypes folder showing us what's in there.

Link to comment
Share on other sites

Is there the possibility that you mixed up the two paint.net variants Standard and Shop? Then there are different FileType folders.

I would expect that paint.net throws an exception if the dll is in the right folder but access is denied.

 

 

midoras signature.gif

Link to comment
Share on other sites

Quote

post a screenshot of your FileTypes folder showing us what's in there.

 

I recommended this ^ so we can also check the path is correct. That's what @midora is talking about.

Link to comment
Share on other sites

 

10 hours ago, Ego Eram Reputo said:

 

I recommended this ^ so we can also check the path is correct. That's what @midora is talking about.

 

Well, I guess a picture's worth at least a couple of words. Here's where I installed the files. But see my forehead-smacking realization bolded farther down...

 

filetype-path.thumb.png.393314ad21742f0a078ad891cc80ea89.png

19 hours ago, midora said:

Is there the possibility that you mixed up the two paint.net variants Standard and Shop? Then there are different FileType folders.

I would expect that paint.net throws an exception if the dll is in the right folder but access is denied.

 

 

 

I'm not sure what the "Shop" version is, unless you mean the Microsoft Store? I've only ever had the standalone version. 

 

 

HOWEVER, your post made me poke around and finally notice that there were NO OTHER FILES in the parent folder of my FileTypes folder, only a handful of other folders (Effects, Shapes, Staging). That's because everything else is where the program actually lives, Program Files (x86), not plain old Program Files

 

I moved the filetype libraries to the correct folder, and now I can save out ZIP files. Too bad the reason I went down the path in the first place has come and gone. But I'll be ready for next time. 

 

Thanks for the help and motivating me to look more carefully. 

Link to comment
Share on other sites

  • 5 months later...
  • midora changed the title to 'ZIP Archive' FileType Plugin (.ZIP) [Latest v1.4 2021-11-04]

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