Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 29

Thread: Need Alpha Channel Support in PNG images

  1. #1
    IV Newbie
    Join Date
    Sep 2007
    Posts
    2
    OS
    Win Vista Home Basic

    Default Need Alpha Channel Support in PNG images

    Currently IrfanView does two things with PNG files that have finally reaching the quite annoying stage.

    It doesn't display them correctly using the alpha-channel if present.

    It doesn't preserve the alpha channel if I load a PNG file with alpha and then save it back out.

    I love IrfanView but it seems like more and more I am having to start up GIMP just to do a simple resize or crop of a PNG file.

    FWIW, I am a registered/paid user.

  2. #2
    Moderator Sam_Zen's Avatar
    Join Date
    May 2007
    Location
    NL
    Posts
    1,896
    Version
    IrfanView 4.27
    OS
    Win XP Home SP1
    CPU Cores
    1

    Default

    Fwiw, this community is trying to address any question of anybody with serious attention, paying or not.
    Do you have examples of 'before' and 'after' files ?

    Never used this alpha channel, so it's a bit guessing :
    In the save as PNG dialog there's an option for the PNGOUT plugin.
    If you check Options you will see choices under 'Color type' with or without Alpha.
    Last edited by Sam_Zen; 15.09.2007 at 02:09 AM.
    0.6180339887
    Rest In Peace, Sam!

  3. #3
    Power User j7n's Avatar
    Join Date
    Jun 2006
    Location
    Cyberspace
    Posts
    544
    Version
    IrfanView 4.51
    OS
    32-bit Win Server 2003 SP1
    CPU Cores
    1

    Default

    Alpha channel is used for transparency with 256 levels of opacity, instead of just 2 levels as in GIF files. Upon loading IrfanView renders the alpha channel to the selected background color (preferences -> viewing -> main window color), the alpha channel itself is then discarded.

    For the sake of argument I tried forcing RGB+Alpha in PNGOut. The same behaviour. But even if it would be possible to do that in pngout, this is no solution for everyday work, because pngout is too slow. There are some uses for it, such as publishing on the internet, where every kB counts.

    There was already a discussion about transparency. If I recall correctly it ended with a rhetorical question: Should IrfanView support layers?

  4. #4
    Moderator Laurent's Avatar
    Join Date
    May 2007
    Location
    Brussels, Belgium
    Posts
    882
    Version
    IrfanView 4.25
    OS
    32-bit Win XP Pro SP3
    CPU Cores
    2

    Default

    Hi Everybody,

    IrfanView is able to read the alpha channel (is it correct to call this a layer?), so in my opinion it would be great if it could write them back too, because it's a normal expectation for most users, like Phergus. They probably can't even imagine that alpha channel could be ignored at writing. Otherwise, IrfanView should at least give a message like "Warning! Your image has an alpha channel (transparency). IrfanView will not preserve it. Are you sure you want to save / overwrite your image? Yes / No". But this wouldn't be practical in batch mode; and what about command-line?

    My preference is of course that IrfanView is able to preserve the alpha channel when re-writing the file (this does not mean it should be able to create one). This implies of course more complex operations on the images when they are cropped, resized, etc. because they should also be done on the alpha channel too. But I have no idea wether this is an easy modification or requires in-depth modifications.

    Is this a reasonable Feature request?

    Laurent

  5. #5
    IV Newbie
    Join Date
    Sep 2007
    Posts
    2
    OS
    Win Vista Home Basic

    Default

    Quote Originally Posted by Laurent View Post
    My preference is of course that IrfanView is able to preserve the alpha channel when re-writing the file
    Which is exactly what I'm asking for.

    Quote Originally Posted by Laurent View Post
    (this does not mean it should be able to create one).
    IrfanView doesn't need support for layers or the creation of alpha-channels. It just shouldn't lose them when it writes the image out again.

    Quote Originally Posted by Laurent View Post
    This implies of course more complex operations on the images when they are cropped, resized, etc. because they should also be done on the alpha channel too. But I have no idea wether this is an easy modification or requires in-depth modifications.
    I doubt this would be particularly difficult challenge for Irfan.

    Quote Originally Posted by Laurent View Post
    Is this a reasonable Feature request?
    Would people think it was okay if IrfanView saved GIF files and lost the transparency?

    PNG is an important image standard for the web and it needs to be well-supported in IrfanView.
    Last edited by Bhikkhu Pesala; 17.06.2016 at 07:54 AM.

  6. #6
    Moderator Sam_Zen's Avatar
    Join Date
    May 2007
    Location
    NL
    Posts
    1,896
    Version
    IrfanView 4.27
    OS
    Win XP Home SP1
    CPU Cores
    1

    Default

    Thanks for the techs about the alpha channel, 7jn.
    I also had the question, as Laurent, is it correct to call this a layer?
    Now that I know the concept better, I would say no. It's more a kind of overlay on the color-palette.
    Maybe the difference is : you can mirror a layer independent of the actual background.

    Of course if some variables and data can be read by IV, it shouldn't be lost when saving again.
    But modifications, let alone converting to other formats, per definition can't guarantee that.
    I strongly agree with Phergus. PNG is my favorite standard for the web, because of the quality and versatility.
    So it should be tuned very well in IrfanView.
    0.6180339887
    Rest In Peace, Sam!

  7. #7
    Power User j7n's Avatar
    Join Date
    Jun 2006
    Location
    Cyberspace
    Posts
    544
    Version
    IrfanView 4.51
    OS
    32-bit Win Server 2003 SP1
    CPU Cores
    1

    Default

    Alpha channel is basically like another color besides RGB, which can be utilized for any purpose. Currently there is a problem that one may not notice the lost Alpha until it is too late. If IrfanView is your only graphics program and you reload the saved file just to check if it's OK, you'll see the same picture with and without the alphachannel. Happy about the exceptionally good "compression" irfanview has performed, you keep the new file and it's a disaster.

  8. #8
    IV Newbie PhiLho's Avatar
    Join Date
    Jul 2007
    Location
    near Paris, France
    Posts
    7
    Version
    IrfanView 4.00
    OS
    Win XP Pro SP2

    Default

    Quote Originally Posted by Sam_Zen View Post
    is it correct to call this a layer?
    Not really, it is more like a fourth color channel, the format is called RGBA.
    I agree with the request, we don't ask for sophisticated management of this channel, just to preserve it, even through resizing and cropping. And its management is, AFAIK, strictly identical to the other channels, so it shouldn't be so hard. The only issue I can see is that it might use twice the memory: once for display (merging channel with background color) and once for manipulations.

  9. #9
    Occasional User
    Join Date
    Dec 2006
    Posts
    113

    Default

    Please respect that PNG uses pre-multiplied Alpha. This makes it a little bit more complex.

  10. #10
    Moderator Sam_Zen's Avatar
    Join Date
    May 2007
    Location
    NL
    Posts
    1,896
    Version
    IrfanView 4.27
    OS
    Win XP Home SP1
    CPU Cores
    1

    Default

    Quote Originally Posted by PhiLho
    ..it might use twice the memory: once for display (merging channel with background color) and once for manipulations.
    So I suppose at least a resemblance, in the practical consequences, with the use of layers.
    0.6180339887
    Rest In Peace, Sam!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •