Martin Osieka

Members
  • Content Count

    136
  • Joined

  • Last visited

  • Days Won

    13

Posts posted by Martin Osieka


  1.  

    '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 6

  2. What the hell happened with the Cancel button? ;-)

    Sorry for some reason OptionBasedLibrary 0.7.9 moved the button out of the dialog window. This happened a while ago but nobody complained ;-) So we have to update some tools like 'Parallel Lines and Pattern', 'Color Harmonies'...

     

    Back to topic. Thanks for the replies. Maybe an additional explanation:

     

    There are two basic internal operations used in image processing. One is the 'Color Matrix' used to manipulate single pixels and second the 'Convolution Matrix' used to build filters like emboss. Typically a user can not access these matrices because no one likes to think about the math to reach a certain effect. So providing such plugins is just to offer people the possibility to play on this level (a basic kind of programming) and maybe to understand what's going on in the background.

     

    racerx pointed to Channel Mixer. This PhotoShop tool is already one level above and a little bit more restricted. But for sure easier to use. There is an advanced channel mixer plugin here. I'm not sure if it is much easier to handle like Color Matrix. But there are sliders ;-)


  3. Because setting the alpha channel of the selection to opaque is not an unusual operation, I added a preset for this to the dialog and did some clean-up.

     

    Update: 1.1 (25.6.2015)
    - Added 'RGB (solid)' entry to set the alpha channel to opaque
    - Added column titles
    - Renamed the dll file. You have to remove the old ColorMatrix.dll/.dlc file !!!
    - Updated OptionBasedLibrary
     

    • Upvote 1

  4. Maimilian, Nitenurse, ReMake I hope you and others will find it usefull at some time.

    Special thanks to ReMake who did the translation to русский.

     

    Long work ended with a very good plugin.

     

    This triggers me to provide a little bit statistic about the amount of work.

     

    The c# source code is around 600kb or 14'000 lines of code. Just 3% of the code handles rotation, clipboard and file functions. The remaining part handles the User Interface. Around 70% precent of the code has been derived from other projects like the OptionBasedLibrary of PrintIt and the new code will be reintegrated to the code base. So hopefully most stuff can be reused in more sophisticated plugins.

     

    Maybe these numbers give you an idea about the amount of work, Rick invested in Paint.NET over the years.


  5.  

    'Spirit Level' Photo Effect Plugin

    Summary

    This Paint.NET effect plugin allows you to rotate a layer using a virtual spirit level. If you need to rotate an image then flatten it first. The rotation is limited to the range +/- 45°. This restriction allows the plugin to distinguish between horizontal and vertical leveling automatically.

    Auto Scale modes allow you to define how the rotated layer will be scaled in the exiting image. Respect that the rotated image will be cropped to the current image dimension.

    Padding modes define how areas uncovered after the rotation will be filled up. Padding does not have any effect to the rotated area itself. So a transparent area in the image will stay transparent.

    If you need the rotated image in its rotated size (without scaling or cropping) then use the 'Copy' to clipboard command in the plugin, cancel the dialog, and execute Paint.NETs 'Paste into New Image' command. Or use 'Save As ...' to store the rotated image in a file.

     

    SpiritLevel.Effect.Dialog.1.0.jpg

    Keywords

    Straighten, Rotate, Spirit Level, Plumb Bob, Horizontal, Vertical, Horizon

    Author

    Martin Osieka

    Download >> SpiritLevel v1.0 (16.5.2015)

    Installation

    Follow the instructions carefully

    • Unzip "SpiritLevel.Effect vX.X.zip"
    • Copy the two files SpiritLevel.Effect.dll/.dlc to the Paint.NET\Effects\ folder
      .dll contains the module code
      .dlc contains the module configuration (like translated text)

    After a restart of Paint.NET you will find the plugin at
        Menu->Effects->Photo->Rotate using a spirit level...
    oder für deutsche Anwender unter
        Menu->Effekte->Foto->Rotieren mit Wasserwaage...

    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
    • русский (provided by ReMake)

    You may add your own translation to the .dlc file.

    Dialog options

    Choose the object in the image you like to align horizontal or vertical by drawing a line to the image. After releasing the mouse button the image will be rotated so that the line is horizontal or vertical in the main canvas.
    You may drag the start and end points of the line later to correct the position.
    If the angle of the line you have drawn is less than +/- 45 degrees compared to a horizontal line then a horizontal leveling will be done else a vertical one.
    Tip: The precision of the rotation depends on the length of the line. Longer is better in this case.

    Auto scaling modes:
    If you rotate an image then parts of the image will no longer be inside of the original image dimensions and other parts will be uncovered. A plugin can not change these dimensions but you can choose one of the auto scaling modes to define how the rotated image will fit into the original image.

    • Scale In: Increases the size of the image so that there are no uncovered areas
    • Off: No scaling
    • Scale Out: Decreases the size of the image so that there are no parts outside.

    Padding modes:
    If there are uncovered areas after the rotation then the padding mode defines how these areas will be filled.

    • Transparent
    • Primary color
    • Secondary color
    • Keep: The uncovered areas show the pixels of the original unrotated image
    • Mirror: Mirrors the rotated image at the borders. This provides the most natural effect on photos.

    The basic user interface of the canvas will be explained in an other message.

    Known issues

    None

    History

    • 1.0 (16.5.2015)
      - First release
    • Upvote 7

  6.  

    'What's It?' Tools Effect Plugin

    Summary

    This Paint.NET effect plugin allows you to identify files by looking for a file type specific signature in the file content.
    If Paint.NET fails to open an image then you may check with this tool if the file extension is wrong and correct it.
    Warning: If a file can be identified by the plugin then this does not mean that the file can be loaded by a Paint.NET native or plugin file type. The file may be corrupt or use an unsupported sub format.

    If you are missing a specific file type or get a wrong identification just tell and we will see what can be done.

    Keywords

    Identify Files, File type, File extension

    Author

    Martin Osieka

    Download

    Find the latest version of the plugin WhatIsIt.Effect v1.0 (11.4.2015) here WhatIsIt.Effect v1.0.zip

    Installation

    Follow the instructions carefully

    • Unzip "WhatIsIt.Effect vX.X.zip"
    • Copy the two files WhatIsIt.Effect.dll/.dlc to the Paint.NET\Effects\ folder

    After a restart of Paint.NET you will find the plugin at
           Menu->Effects->Tools->What's It?...
    oder für deutsche Anwender unter
           Menu->Effekte->Werkzeuge->Was ist es?... ;-)

    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:

    You may add your own translation to the .dlc file.

    Dialog options

    The basic windows just shows a list view panel and two buttons. One to identify a file and a second to exit the application.
    The list view shows all file types which can be identified by the plugin.
    The effect window has a hidden menu line. To show the menu line press the ALT key or click to the icon on the top left corner of the window frame.

    Known issues

    None

    History

    • 1.0 (11.4.2015)
      - First public release
      - Supports around 50 well-known file signatures
    • Upvote 2

  7. If it hangs then maybe this change

     

    - Printer tab: Added printer status and type information. Status message changes may be slow on some devices. It depends in most cases on the printer driver.

     

    may create a timeout problem with some network printer drivers. I know a Brother printer where the status change takes ten minutes. But it does not hang in the startup. The problem may be that it is not possible to provide a timeout to all the driver functions in C# you have to use managed code hacks to get to the underlying os functions.

     

    OptionBasedLibrary should not be involved in this issue. It is responsible for managing UI functionality.

     

    I will check some methods after easter.

     

    Thanks for reporting.


  8. Updated the version in the first post to 0.2

     

    Features on save dialog

    - Select format of embedded images: PNG, BMP, GIF, JPEG

    - Add thumbnail

    - Add Composite

    - Tiling of layers (W x H pixels).

     

    Load does not need a dialog in the moment.

     

    Be careful with the tiling feature. This is a kind of 3D tiling ;-)

    Assume you are saving a 3 layer image 800 x 600 with a tiling of 8 x 8 pixels.

    This will generate 3 * 100 * 75 = 22500 files in the zip.

    I would expect that this feature is useful just on flattened images.

    If you are generating a lot of tiles and the size field on top of the preview says 'Computing 100%' then the preview is active in loading the zip back and glue the tiles together. This may take a while.

     

    Tested on Windows 8 and XP. Can not test on Windows 7 in the moment.


  9. Yes I miss LayerSaver! Thank You! <3

    There are so many times where I want to export paint.net's layers as individual images. I also miss LayerSaver as it was the only other thing that could read pdn. files.

     

    However, before I try this plugin out, you say it's a test plugin, it might have errors, and it might conflict with something, so will a more stable version be coming out?

     

    No that's not really true. Irfanview can view .pdns (the composite image and the individual layers as a multipage image).

    And pdn2png.exe or pdn2bmp.exe command line tools can extract composite image or individual layer images from .pdns.

    All these tools do not require that Paint.NET or a dot net framework is installed.

     

    This is a developer section so you should not expect to get a final version. Especially if the developer is asking which features the users expect.

     

    The conflict I was talking about is a general issue of paint.net. 4.0.5 works better than older versions regarding this issue but still not perfect.

     

    There are several filetypes in the subforum which share support for the same file extension. And there is a small risk that these are conflicting.

     

    Still this is beta software and not alpha or less.


  10. For sure I know ORA but I'm not looking for a replacement for it. A format like ORA has always the problem that not all applications are using the same features (i.e. blendmodes). An ImZip created zip including a paint.net document would always contain the same information as the equivalent .pdn file. So you could work just with the .zip instead of .pdn and still access the individual layers easily in the FileExplorer.

     

    -but the basic idea is to get a plugin which can be used instead of LayerSaver.

     

    Paint.NET FileType can't access the destination file or the location so I guess .zip is the easiest for people to handle a group of files. Especially because Windows FileExplorer can open them as a virtual folder.

     

    The question to the users is what kind of files do they expect in the group. Is png enough? In the moment the plugin supports internally png w/ and w/o alpha, bmp w/ and w/o alpha, and gif. An other question may be if the file names should follow a special naming convention.

     

    The one to one mapping between a pdn document and the content of the zip is only one advantage. You may also open single images included in zips (i.e pages in the .cbz).


  11. Released. See 'ZIP Archive' FileType Plugin (.ZIP)

     

    ---

     

    Maybe some users are missing LayerSaver in 4.0.

     

    I created a filetype ImZip.FileType as an alternative to LayerSaver: ImZip.FileType v0.2.zip

     

    It saves and loads the pdn document as a zip archive which contains

    - a thumbnail png.

    - pngs of all layers (The filename of the pngs contain the layer index, name, visibility, blendmode and opacity.

     

    This is a test version. There are error checks missing and more.

     

    In the moment the layer attributes are coded in the filenames. I'm thinking about to put them in an xml file

    'Paint.NET.pdni' to describe the file structure.

    There should be a unique file in the archive to identify the archive as a PDN zip.

     

    This filetype may conflict with the 'Image Tiling FileType' because both are using the extension .zip.

    Maybe I'm incorporating the tiling feature into ImZip.

     

    ImZip.FileType has no UI.

     

    Feedback is welcome.

     


  12.  

    'Windows Metafile' FileType Plugin (.EMF, .WMF, .EMZ, .WMZ)

    Summary

    Imports Windows metafiles and renders them to Paint.NET bitmap layers. Supported types are WMF, EMF, EMF+, and the compressed variants WMZ and EMZ. The compressed variants are not documented but MS Word is able to insert them.

    There is a very basic implementation of export to EMF. It embeds the bitmap layer of Paint.NET into an EMF. Because it is not possible to generate vectors from the bitmap this feature is of limited use.

    Author

    Martin Osieka

    Download

    Find the latest version of the plugin ImEMF,WMF.FileType v1.1 (8.3.2015) >> HERE <<

    Installation

    Follow the instructions carefully

    • Copy the two files OptionBasedLibrary vX.X.dll/.dlc to the Paint.NET\ folder (NOT to Paint.NET\FileTypes\ !!!)

    • Copy the two files 'ImEMF,WMF.FileType.dll/dlc' to the Paint.NET\FileTypes\ folder

    • Do not remove older versions of the OptionBasedLibrary if they are required from other plugins.

    To verify the installation you should restart Paint.NET and check that in the filetype popup in the open file selector dialog are entries starting with EMF and WMF.

    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

    Dialog options

     

    ImEMF,WMF.FileType.Dialog.jpg

     

    • File Infos section

    This section just shows settings loaded from the file. Typically the resolution is the physical resolution of the screen attached to the computer where the metafile has been created. The pixel values are somehow virtual because a metafile contains a vector grafic. There are three basic variants of Windows metafiles:

    - WMF (Windows Metafile) is the oldest and supports GDI 16bit only.
    - EMF (Enhanced Metafile) is the update to GDI 32bit.
    - EMF+ (Enhanced Metafile Plus) adds the features of GDI Plus (i.e. anti-aliasing and alpha channel)

    • Render section

    The default values of resolution and extent are the values in the File Infos section. By increasing or decreasing the dpi value you are changing the quality of the final image.

    The anti-alias option allows you to improve the quality of the old formats WMF and EMF. This is done by translating all commands in the file from GDI to GDI Plus. This feature is off by default because the translation may have unexpected effects in the final image.

    The background color defines the filling of the image canvas before the rendering starts. The default color is transparent white.

    Known issues

    • Paint.NET does not provide a load dialog template to filetype plugins. So to allow the plugin to show a dialog it delegates its dialog (derived from PdnBaseForm) to the thread of the main window. This works fine but not perfect. I.e there will not be an error beep if you are clicking to the main window while the load dialog is open.
    • If you are canceling the option dialog you will get an unspecified error. But this just means that Paint.NET has no idea about canceling the load operation. PDN4 allows you to check the error details. If it tells "Canceled by user" then no error happened.
    • If you try to 'Save' (not 'Save As') a loaded metafile then Paint.NET will not fallback to 'Save As' automatically. The 'Save' dialog opens and shows an error. This is fixed in Paint.NET 4.0.

    Examples

    • Example Bike.wmf is an example metafile found on the web. Load it with the anti-aliasing option switched off and on to see the difference.
    • Example Sheet.emf and Example Sheet.emz contain the same graphic but the compressed variant is just 10% in size.

    History

    • 1.1 (8.3.2015)
      - Replaced in 'File Infos' section the dpi values line with a line showing the
        physical size given in the metafile.
      - Use of virtual pixels to describe the device units in the meta file.
    • 1.0 (22.2.2014)
      - First public release

  13. Hi,

    every time I want to save a pgm image in Paint.NET, this website open just after the "Save Configuration" dialog appears, undemanded. It just opens that website in my browser, although I didn't click any buttons or so.

    This is very annoying. Can you fix it or forward this to the developers of this plugin? I couldn't register in their forum, and found no contact details.

     

    Should not happen for sure but you may get in a state that it will happen (so I'm able to reproduce it).

    There is no easy fix in the code but a solution to get rid of your issue:

     

    - Open Paint.NET

    - Save the 'Untitled' image somewhere as PGM

    - If the Save dialog is open then click the defaults button.

    - Click OK (so the file will be created).

    - Close Paint.NET.

    - Remove the Untitled.pgm

     

    You may skip the following details ;-)

    The problem is that buttons are counters in IndirectUI. To check if a button is clicked you have to compare the current value with the previous one. Filetype plugins (not Effect plugins) remember the settings of the dialog in the registry. In case of a button this is the incremented value. So if you once clicked the button and restarted Paint.NET later then the values will be different and the plugin thinks that the button has been clicked.

     

    Sorry that you may not get an answer on the forum but we are fighting with hundreds of spam users a day. You may use an IP which will not get a response.