Announcement

Collapse
No announcement yet.

Problem Saving Images With a Transparent Background

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

    Solved Problem Saving Images With a Transparent Background

    Originally posted by Bhikkhu Pesala View Post
    This makes no sense. When you past an image from MS Paint into IrfanView from the clipboard it is just a bitmap. I have no difficulty in saving it as PNG with transparency.
    Well, I confirm it doesn't work for me either.

    I can only save transparent PNGs by converting them from transparent GIFs. And even then I still have to choose to remove the color black (that signals transparency in IrfanView).

    #2
    Originally posted by lwc View Post
    Well, I confirm it doesn't work for me either.

    I can only save transparent PNGs by converting them from transparent GIFs. And even then I still have to choose to remove the color black (that signals transparency in IrfanView).
    It still makes no sense. Maybe you're trying to save a JPG as a PNG? JPG backgrounds are often not a single colour. Any bitmap copied via the clipboard can be saved as a 24-bit transparent PNG from IrfanView.

    Please attach a sample image.
    Last edited by Bhikkhu Pesala; 30.11.2009, 12:28 PM.
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
      Please understand that I have no troubles at all turning the same images into transparent GIFs. If you insist, you can give me any image you want and I'll give it back in transparent GIF and non transparent PNG.

      BTW, I have "Use PNGOUT Plugin" disabled (per the default), but it's not supposed to matter ("Save Transparent Color" is an independent option).
      Last edited by lwc; 30.11.2009, 04:04 PM.

      Comment


        #4
        Look, I took countless images and did the "pick a color" thing. It always creates transparent GIFs and never creates transparent PNGs (unless the source itself is transparent).

        Please give me any image you want and I'll test it.

        Comment


          #5
          Then I have to assume that you are doing it wrong. Save as PNG and save as GIF are different actions. I don't have any problem at all saving transparent PNG, so it you who is in need of help here. Therefore provide a sample image that you say cannot be saved as PNG, and I will test it for you.
          Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

          Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

          Comment


            #6
            Fine. At the hope that you won't say I chose a bad image or something (trust me that I tried endless images/backgrounds/colors - I didn't choose white here because that's also the background when the forum shows images):
            Attached Files
            Last edited by lwc; 30.11.2009, 05:10 PM.

            Comment


              #7
              As I thought, you don't have a clue what you're doing. I suggest you do some background reading and stop wasting our time with spurious "bug reports."

              If you want to save a JPG image as a PNG with a transparent background then you first need to ensure that all of the intended background is a single colour. With 24-bit PNG images only one colour can be transparent.
              Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

              Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

              Comment


                #8
                I realize you may not mean it, but please stop always "yelling" and insulting me and others. This is just a technical forum, not a boxing ring. Let's discuss technical things in a civilized manner.

                If black (or white) isn't a single color, what exactly is?

                Anyway, it's very simple:
                1. IrfanView doesn't have a "user must be an expert on X" system requirement. The average user just clicks something and expect - like every other function in IrfanView made the user accustom to - success or an error message.
                2. IrfanView lets you enable transparency when saving to PNG.
                3. It then asks you to choose a color to turn into transparent.
                4. If you're right, unlike the end user, IrfanView itself knows which sources can turn into transparent PNG and which can't. And yet it still lets you attempt it in vain even for sources for which it knows it's impossible. And even after all of this, it still doesn't tell you something went wrong.
                5. If you save to a transparent GIF first, then it works.

                So, again assuming you're right, IrfanView should only make this option visible when it is actually valid (or at replace the "choose a color" screen with a "sorry, it's not possible for this source" message). If not, then it should at least save but then display "sorry, it was saved as a non transparent PNG due to an incompatible source".

                And if all else fails, it should do whatever it does when it saves to a transparent GIF, and only then convert the final result to PNG.
                Last edited by lwc; 30.11.2009, 08:12 PM.

                Comment


                  #9
                  Originally posted by lwc View Post
                  If black (or white) isn't a single color, what exactly is?
                  Check the colour of each pixel on that book cover. Hold the mouse on a pixel and check its colour in the title bar. You will see than there are many different shades of black in the background. Whichever pixel you pick will be the transparent colour.
                  If you're right, unlike the end user, IrfanView itself knows which sources can turn into transparent PNG and which can't.
                  As I said IrfanView can save any source bitmap as a transparent PNG.
                  Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                  Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                  Comment


                    #10
                    Originally posted by Bhikkhu Pesala View Post
                    will see than there are many different shades of black in the background. Whichever pixel you pick will be the transparent colour...As I said IrfanView can save any source bitmap as a transparent PNG.
                    Oh, I see, so you say just one shade of black is transparent there.

                    If so, I would still argue the average user would expect that IrfanView would do whatever it does when it saves to a transparent GIF, and only then convert the final result to PNG. Since I already see a reversed bug report in the future, maybe it should be a setting ("use GIF methods when converting to a transparent PNG").

                    Or at least mention something about this issue right in the "save as" GUI.
                    Last edited by lwc; 30.11.2009, 08:18 PM.

                    Comment


                      #11
                      I would suggest a short paragraph in the Help file. But that is seldom read.

                      The "average user" prefers to blame the software for the results of ignorance. I sometimes have to rescue computers from "average users" who unknowingly abuse them and then complain that they are "broken" when there is really nothing wrong. Knowledge is readily available for anyone with an Internet connection. Finding and using it are part of a process of growing and maturing.

                      That was a general statement.
                      Its: Belongs to "It"
                      It's: Shortened form of "It is"
                      ---------------------
                      Lose: Fail to keep
                      Loose: Not tight

                      ---------------------
                      Plurals do not require apostrophes

                      Comment


                        #12
                        Right on...
                        0.6180339887
                        Rest In Peace, Sam!

                        Comment


                          #13
                          Originally posted by matera View Post
                          The "average user" prefers to blame the software for the results of ignorance. I sometimes have to rescue computers from "average users" who unknowingly abuse them and then complain that they are "broken" when there is really nothing wrong. Knowledge is readily available for anyone with an Internet connection. Finding and using it are part of a process of growing and maturing.
                          Yes, but using your disc tray as a coffee cup holder is not exactly the same as clicking something without anything supposedly happening when it does work for a similar function (transparent GIFs).
                          Last edited by lwc; 02.12.2009, 07:07 AM.

                          Comment


                            #14
                            Not if the function that you demand is not available. You want the program to read your mind and take a guess. You click on one random pixel among many, and expect that the program will NOT choose that particular shade -- of which there may be no more than forty pixels in the whole image -- but will choose instead to make the most common "black" color transparent. Then, when you click on a lucky choice for a different format, you assume that it should have been the same for both. If you had clicked on exactly the same pixel each time, it would work just as well -- or as badly -- each time.

                            It simply isn't practical to try to create transparency with a JPG, at least not without doing some alterations first. The colors are never clean enough. There is no tolerance factor in selecting a transparent color. If you use the IrfanPaint color fill tool to create truly solid areas first, the transparency would not have been aproblem at all. Play around with that tool -- try filling apparently solid colors in a JPG with the tolerance level very low. You will see how little uniformity there is even when your eye claims that the color is perfectly solid.

                            Take a look at the attached examples. The PNG was converted from the JPG. Directly. By IrfanView. There is a large transparent area. Why? Because the odds were good in an area of fairly uniform color in an image that small, and I hit a good pixel. Note all the scattered bits. To the human eye, there is no difference. To the computer, each one of the thousands of possible colors is as unique as any snowflake. One byte off is as good as a mile.
                            Attached Files
                            Its: Belongs to "It"
                            It's: Shortened form of "It is"
                            ---------------------
                            Lose: Fail to keep
                            Loose: Not tight

                            ---------------------
                            Plurals do not require apostrophes

                            Comment


                              #15
                              You keep talking about JPG sources, but the correct term is "any non transparent GIF source". If I open Microsoft Paint and paint something within a white background, then copy and paste to Irfanview, I still can't turn that white background to a transparent PNG. Isn't that white background just one shade?

                              Comment

                              Working...
                              X