Announcement

Collapse
No announcement yet.

ImPDN

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ImPDN

    In the future there will be a new plugin for Irfanview which allows to view .pdn files.
    These files are the native file format of the digital image editing application Paint.NET.
    A .pdn files stores only layers and not the composite image created from the layers.
    So the plugin has to merge the layers respecting transparency, alpha channels and blend modes.

    We created a simple command line tool for test and invite you to test and report problems.

    The tool can be found here

    #2
    Hi Martin,

    I´m going to test it

    Maybe you can add "umlauts" support:

    Code:
    pdn2bmp /argb /outfile="hallöchen.bmp" test.pdn
    Output will be:
    Code:
    hall÷chen
    And

    Code:
    pdn2bmp /argb /outfile="äöüÜÖÄß.bmp" test.pdn
    outputs:

    Code:
    õ÷³▄Í─▀.bmp
    I guess you have to set a "simple" Encoding argument

    So far,

    Stefan

    EDIT: Conversion won´t work if the input filename contains "umlauts".

    Comment


      #3
      Hi Stefan,

      Originally posted by stefan View Post
      EDIT: Conversion won´t work if the input filename contains "umlauts".
      The application should be unicode aware. OK not the error or debug messages which may result in strange output messages for unicode filenames. I will change this up to tomorrow.

      I tested your /outfile="äöüÜÖÄß.bmp" argument and it is working for me on Win7.

      What does "outputs:" mean? The new name in the filesystem or an output on the console?

      cu

      Comment


        #4
        Hi Martin,

        very strange: the command on commandline (!!!):

        Code:
        pdn2bmp /argb /outfile="äöüÜÖÄß.bmp" test.pdn
        Creates the file äöüÜÖÄß.bmp correctly. BUT: if I use the same command in a batchfile the created file will be named:

        Code:
        õ÷³▄Í─▀.bmp
        (Windows 7, 32-bit)

        Stefan

        EDIT:

        Click image for larger version

Name:	diffs.png
Views:	1
Size:	5.0 KB
ID:	80552

        Comment


          #5
          OK. I guess you should save the .bat in unicode encoding.
          This codepage translation in batch files is not always working.

          Comment


            #6
            Hi,

            I saved the batch file as an utf8 encoded file - but it isn´t interpreted by the command line correctly:

            (I´m calling the batch script in commandline)

            Code:
            C:\Users\swt\Desktop\pdn2bmp v0.1>´╗┐pdn2bmp /argb /outfile="├Â├ñ├╝├û├ä├£├ƒ.bmp"
             /pause test.pdn
            Der Befehl "´╗┐pdn2bmp" ist entweder falsch geschrieben oder
            konnte nicht gefunden werden.
            Well... I really miss my unix command line here

            Stefan

            Comment


              #7
              Hi,

              ok - no impdn bug of course.

              Workaround for German umlauts:

              Open a new command line. Type:

              Code:
              echo äöüÖÄÜß > umlauts.txt
              Open the umlauts.txt and copy:

              Code:
              „”™Žšá
              to the pdn batchfile as new output name:

              Code:
              pdn2bmp /argb /outfile="„”™Žšá.bmp" /pause test.pdn
              Now the batch file will create the correct filename:

              Code:
              äöüÖÄÜß.bmp
              I guess it will be the same procedure when using unicode filenames!

              Stefan

              Comment


                #8
                Originally posted by stefan View Post
                I saved the batch file as an utf8 encoded file - but it isn´t interpreted by the command line correctly
                Don't do that as long as the application does not request UTF-8 (like the next ghostscript version).

                Just open the batch file in notepad and select in the save file selector the encoding unicode.
                This will add a unicode BOM at the beginning of the file.

                Comment


                  #9
                  There is an update of pdn2bmp available on the web page (here) which allows to extract the layers of a .PDN to .BMPs.

                  Also there is a new tool which takes .BMPs and creates a .PDN file.

                  With these two tools you are able to split a .PDN, manipulate the bitmaps and merge them together to a new .PDN.

                  Comment


                    #10
                    I am having no success with bmp2pdn. I suspect that I am misunderstanding your Help notes. I am trying to create a file named test.pdn from two images face.bmp and object.bmp for which I assume the basic code should be
                    Code:
                    bmp2pdn.exe /outfile=test.pdn face.bmp object.bmp
                    I have tried this both with and without properties and layer names but always get the message
                    Code:
                    Error -1021 in bmp2pdn
                    All the files are in the current folder.
                    Could you give an example of what my code should be please.

                    Comment


                      #11
                      Originally posted by Mij View Post
                      I am having no success with bmp2pdn. I suspect that I am misunderstanding your Help notes.
                      No misunderstanding. I updated the tools.
                      Most of the time in this beta phase I'm just testing by using the output of pdn2bmp as input for bmp2pdn and this worked for me.

                      I added examples to the /help output and the possibility to define the properties of the layer independent from the .bmp filename. Hopefully this works for you now.

                      Comment


                        #12
                        Yes, I can now create a pdn file from 2 bmp files using bmp2pdn. I can open the pdn in Paint.net but I get an error in Paint.net if I try to save it again even without making any changes.

                        Do you intend to use bmp2pdn in an Irfanview plugin in any way or do you intend just to use pdntobmp to load pdn files?
                        Last edited by Mij; 23.08.2011, 11:29 PM.

                        Comment


                          #13
                          Originally posted by Mij View Post
                          Yes, I can now create a pdn file from 2 bmp files using bmp2pdn. I can open the pdn in Paint.net but I get an error in Paint.net if I try to save it again even without making any changes.
                          Thanks for the hint. I never tried this. Happy enough that Paint.NET accepted the files. I fixed it and there is a v0.3. For some reason Paint.NET expects some information from the thumbnail section at the time of save. I will add the thumbnail later (but have to include a complete png encoder). In the moment I just added the basics to make Paint.NET not crashing. So open and save in Paint.NET now creates the thumbnail.

                          Originally posted by Mij View Post
                          Do you intend to use bmp2pdn in an Irfanview plugin in any way or do you intend just to use pdntobmp to load pdn files?
                          The ImPDN plugin includes just the functionality of pdntobmp in the moment. But IrfanView will only add features (like split) on strong user requests. The current developer version of Irfanview just allows browsing of .pdn files.

                          The other way round makes not really sense as long as Irfanview does not preserve alpha channels at load.

                          There is something like a pdnscript in development which allows you to manipulate .pdn files with a script language. But it is quite simple in the moment and just allows to manipulate layer structure and has simple drawing features. I.e. you may "open, add a new layer containing a signature, and save" via script.

                          Comment


                            #14
                            Originally posted by impdf View Post
                            The ImPDN plugin includes just the functionality of pdntobmp in the moment. But IrfanView will only add features (like split) on strong user requests. The current developer version of Irfanview just allows browsing of .pdn files.
                            The other way round makes not really sense as long as Irfanview does not preserve alpha channels at load.
                            I was thinking in terms of being able to save the current Irfanview DIB as an extra layer of a pdn file which could then be loaded back into Irfanview merged with the existing pdn layers. It would make more sense though if the extra layer was output as a GIF or PNG, where a transparent color can be specified, rather than as a BMP.
                            Last edited by Mij; 24.08.2011, 08:07 PM.

                            Comment


                              #15
                              Originally posted by Mij View Post
                              I was thinking in terms of being able to save the current Irfanview DIB as an extra layer of a pdn file which could then be loaded back into Irfanview merged with the existing pdn layers. It would make more sense though if the extra layer was output as a GIF or PNG, where a transparent color can be specified, rather than as a BMP.
                              This maybe an idea especially because Irfanview removes the alpha channels from bmps and others. The disadvantage is the you will not get anti-aliased edges. But for a lot of cases a simple transparent color would be fine.

                              Still I guess this feature will not be available in the near future. You know the answer. Irfanview is an image browser not an editor. ;-) Everything that blows up the code without the request of many users will not be implemented by Irfan.

                              Still I hope Irfan will expand the current usage of ImPDN.dll to view a .pdn as a multi page image. Page 1 would be the composite image, page 2 to (number of layers+1) the individual layers. The plugin already provides all necessary functions.

                              There is an update of bmp2pdn (v0.4) which generates the thumbnail in the pdn file. So this tools is more or less finished.

                              Next are some tools sitting on top of this engine. One will allow you to create paper patterns .pdn files. It allows simple forms like cubes, cuboids, polyhedrons and so on. You create the paper pattern with the tool by defining some parameters like width, length, height, ... Then you paint it with Paint.NET. Print it. Cut it. Fold and plug it together. Here is an example of a generated cuboid (6x5x4 cms) .pdn file (PaperPattern_DINA4_cuboid_6x5x4cm.pdn)

                              Comment

                              Working...
                              X