Announcement

Collapse
No announcement yet.

Converting to PNG + Alpha

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

    Converting to PNG + Alpha

    I’ve been using GIMP to convert image files, mostly JPEGS but also sometimes TIFFs and/or 24-bit PNG, to 32-bit PNGs (adding an Alpha layer) on a fairly routine basis for a particular project, and am hoping I can utilize IrfanView instead to do many of the conversions in batch operations. When I do this via GIMP, I am selecting menu FILE > EXPORT…, giving the program a new PNG filename to export to, then selecting “8bpcRGBA” from the dropdown color scheme selector in the PNG options dialog, leaving all other options unchecked except for “Save thumbnail” and “Save color profile”. This gives an image file which is visually identical to the one I exported from, except that the new file is 32-bit whereas the old one was 24-bit, which is what I want as far as the image data goes. This exporting process, unfortunately, is time-consuming and cumbersome, and also results in the loss of some metadata, which I’ve tried experimenting with various metadata-related options to fix but no luck so far.

    Anyway, I thought I’d try accomplishing what I want using IrfanView, but can’t seem to find a way to convert the files in a way that delivers new images which are 32-bit but look identical to the old ones. In IrfanView, I select menu FILE > BATCH CONVERSION/RENAME…, set output format to PNG, click on Options, and select the following options:

    Save Transparent Color
    Save Transparency as Alpha channel

    I then start the batch, but am prompted for each image to select a color to be set as transparent. I don’t want to be prompted, and no matter what color I select, the newly converted image is NOT visually identical to the one it was converted from. Also, all metadata has again been lost.

    If I also select “Use main window color for tranparency”, I’m no longer prompted to select a color, but the exported image STILL differs visually from the original, and metadata is still lost.

    Is there a way for me to accomplish what I want with IrfanView? Ideally, I’d like to be able to do it via command line.

    #2
    IrfanView does not really support transparency. It is lost upon loading and blended against a color of choice, and an approximation can be generated on saving. Lightweight viewers that can process alpha are XnView and FastStone Viewer. But these programs do not have good tools for creating new alpha, nor do they support metadata. They are useful for straight conversion from one format to another.

    Comment


      #3
      IrfanView is a simple image viewer. Pictures are internally converted to RGB, so the RGB values should be the same, but the alpha information is lost.
      You may look for some other tool. For example, ImageMagick. It's very powerful with many options, but it's also pretty complex.
      My system: IrfanView 4.62 64bit, Windows 10 22H2, Intel Core i5-3570, 16GB RAM, NVidia GTX 1050Ti 4GB

      Comment


        #4
        Ok, disappointing, but thanks.

        Comment

        Working...
        X