Announcement

Collapse
No announcement yet.

Support of PNG ancillary information

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

    Requested Support of PNG ancillary information

    I don't believe this has been asked previously, but then again, the forum ignore three letter word searches, which don't ease searching info on a given format...

    My request is that IrfanView should preserve PNG ancillary information (chunks) when saving, particularly tEXt chunks, which can hold information like author, title, copyright... They are, more or less, the equivalent of IPTC info for Jpeg format. This format has options to keep Comments, Exif and IPTC info, I would like to have the same for PNG.
    Currently, if I open a PNG file with IV then save it under another name, I loose the tEXt chunks, but also the gAMA one, the bKGD one (background color), the tIME and even worse, IV converts it from grayscale+alpha to simple paletted image. If I ask to save with transparent color, IV asks me the unique transparent color instead of preserving the previous alpha info...

    So, my suggestion is to improve support of the PNG format, hopefully by supporting at least the above remarks.
    Ideally, IV should allow to add, delete or edit tEXt chunks like it allows to edit comments and IPTC data.

    Thanks.

    #2
    These are indeed valid requests. I think at the moment IrfanView does not know the meaning of grayscale. Upon opening a grayscale PNG it interprets it as 8-bit image with a known palette. When saving such a picture no operations in Photoshop work anymore because the image is no longer in grayscale mode. And for some reason the whole Grayscale-Indexed-Grayscale conversion in Photoshop is not lossless.

    Comment


      #3
      I support any proposal to improve the properties and info of PNG files, because it is mostly my target format.

      I didn't know about these 'ancillary information (chunks)'. It seems like an ID3 tag to sound. or EXIF to a JPG.
      What's the editor to add this data ?.
      0.6180339887
      Rest In Peace, Sam!

      Comment


        #4
        Simple tEXt fields can be added using Paint Shop Pro 7 and 9 ("Image Information"). PSP also sticks pHYs and gAMA there. I have not paid attention to the possibility of storing text metadata in picture files as it is easily to lose this info later and no viewers support it.

        I believe a new options window for PNG format has to be created. The PNGOut already allows us to keep existing ancillary chunks, but PNGOut is too slow for any practical application. The possibility to choose prediction filter should also be added because simple deflate w/o prediction is good for 15/16-bit data (which has been inflated to 24 bits).

        Sam_Zen, What is your opinion about generic transparency support in IrfanView? This is necessary in order to perform any operations on RGBA images.
        Last edited by j7n; 01.08.2007, 06:45 AM.

        Comment


          #5
          Nice to know about PSP7.
          What is your opinion about generic transparency support in IrfanView?
          A tricky question. I'm still not sure about it. Should IV be able to handle layers ?
          0.6180339887
          Rest In Peace, Sam!

          Comment


            #6
            I think only one layer - the transparency mask. Curently it's possible to lose important image data if you don't realize that transparency is unsupported. If input contains several layers (*.psp) a dialog should allow to select one of them.
            Last edited by j7n; 02.08.2007, 05:41 PM.

            Comment


              #7
              Nice idea. One layer would be sufficient for the moment. Even with two levels you need a dialog I guess though.
              This layer needs to have its own undo in memory, otherwise data still will be accidentally lost.
              0.6180339887
              Rest In Peace, Sam!

              Comment


                #8
                Originally posted by Sam_Zen View Post
                I didn't know about these 'ancillary information (chunks)'. It seems like an ID3 tag to sound. or EXIF to a JPG.
                Exactly!

                What's the editor to add this data ?.
                I use the excellent TweakPNG which is old (2004) but still very useful for such operations. It adds a context menu to Windows Explorer on PNG files.
                I changed it with ResHacker to add Ctrl+I menu shortcut to Import Chunk (and I have some pre-defined chunks for Title, Artist and Copyright which I edit after insertion) and Ctrl+T to Insert tEXt chunk.

                Comment


                  #9
                  Thanks a lot, PhiLho. I love tools like TweakPNG. And the readme.txt gives a lot of info about the structure of a PNG.
                  So now I understand your request better, and your examples. So I support this even more.

                  It's off-topic (no way to send a PM or a mail about this), but how did you manage to add shortcuts with ResHacker ?
                  So far I used ResHacker just to extract, add or move icons in an executable.
                  Last edited by Sam_Zen; 21.09.2007, 02:12 AM.
                  0.6180339887
                  Rest In Peace, Sam!

                  Comment


                    #10
                    Originally posted by Sam_Zen View Post
                    It's off-topic (no way to send a PM or a mail about this), but how did you manage to add shortcuts with ResHacker ?
                    First, identify the program function that you wish to assign a shortcut key to in the applications menus — 57612 in this example.

                    Then copy a line in the Accelerator keys section and modify it to use the shortcut you want to use, and using the function's ID.

                    The illustrated example would assign the shortcut Ctrl E to the function "Send by Email." You would add this to the menu with:

                    \tCtrl+E
                    (\t = Tab)
                    Attached Files
                    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                    Comment


                      #11
                      I once read a tutorial how to enhance Microsoft Notepad with keyboard shortcuts using Resource Hacker. Now I can't live with the regular Notepad and copy the advanced Win98 notepad to every computer.

                      Microsoft had omited most standard keyboard shortcuts from Notepad, such as Ctrl-C, F3.
                      Last edited by j7n; 22.09.2007, 06:21 AM.

                      Comment


                        #12
                        Thanks, Bhikkhu. This enhances my options to finetune apps for my personal use.
                        And I guess everyone here has one's own favorite, improved, Notepad alternative.
                        0.6180339887
                        Rest In Peace, Sam!

                        Comment


                          #13
                          Originally posted by j7n View Post
                          When saving such a picture, no operations [...] work anymore because the image is no longer in grayscale mode.
                          Yes, some operations are not possible in indexed mode. But "no operations" is not true. Either way, you can go from indexed to RGB mode with *every* image in any decent image editor (in PS you just click image > mode > RGB color)

                          Originally posted by j7n View Post
                          And for some reason the whole Grayscale-Indexed-Grayscale conversion [...] is not lossless.
                          The second part (indexed to grayscale) is definitely lossless.
                          The first part (grayscale to indexed) can be lossy or lossless. Indexed mode is limited to 256 colors, so if you convert anything with more than 256 colors to a 256 color mode, it's lossy by definition and by design. If your original image has 256 or less colors, then converting to a 256 palette IS lossless (assuming you chose the right parameters).

                          (PS: I omitted the PS reference because my answers are general and don't apply to PS only.)


                          + special thanks to Bhikkhu Pesala for this wonderful trick!
                          Last edited by boarder's paradise; 20.04.2011, 01:30 AM.

                          Comment

                          Working...
                          X