Sign in to follow this  
Martin Osieka

'ZIP Archive' FileType Plugin (.ZIP)

Recommended Posts

 

'ZIP Archive' FileType Plugin (.ZIP)

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

Martin Osieka

 

This software includes the class ZipOutputStream from DotNetZip distribution to
do the zipping. See DotNetZip.License.Combined.rtf.

Download

Find the latest version of the plugin ImZip.FileType v1.0 (8.7.2015) here: ImZIP.FileType v1.0.zip

Installation

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.

Compatibility

Paint.NET 3.5.11 and 4.0.5

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

ImZIP.FileType.Save.Dialog.jpg

 

  • Format of embedded 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 êxtension 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 splitted 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 preceeded 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.0 (8.7.2015)
    - First public release

 

  • Upvote 5

Share this post


Link to post
Share on other sites
Nichromo221    0

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.

Share this post


Link to post
Share on other sites
Ego Eram Reputo    1,692

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Helioxx    0

This seems like a really useful plugin. Unfortunately, when I attempt to extract from the .zip file, my virus scan recognizes the .dll as a Trojan virus and removes it. It doesn't mess with the .dlc, though.

 

Is there any way that I should try to modify the file to allow my computer to accept it, or should I disable the virus scan on the filetypes folder? Thanks to Martin for creating this, I started using Paint.net about when Layer Saver lost compatibility.

Share this post


Link to post
Share on other sites
Eli    772

Are you using Norton? If so, you may need to change antivirus. I have seen many users having the same problem with Norton.

Edited by Eli
  • Upvote 1

Share this post


Link to post
Share on other sites
Hypure    9

Perfect.  Just what I was looking for. You are awesome.....Let it be known from this day forward.

Edited by Hypure

Share this post


Link to post
Share on other sites
Red ochre    1,395

I installed this in Pdn4 yesterday. I scanned the .dll using Kaspersky before installing and that reported that it is safe.
However, I noticed that there is only a .dll in the download, no '.dlc' file , as in the installation instructions?
It seems to work perfectly with just the .dll in the FileTypes folder and it saved me loads of time!

- Many thanks Martin

AlexDolmatov
I just tried downloading using Chrome and it is blocked as you say, (I used Firefox yesterday).
I expect (and hope) it is just a 'false positive' due to it being relatively uncommon perhaps?
Martin Osieka (aka Midora) is highly respected here.
 
Hopefully the Admins will investigate this?
(I just successfully downloaded my own plugins using Chrome - so it's unlikely to be the forum that's flagging up an issue?) :/

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this