Announcement

Collapse
No announcement yet.

PNG files

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

    PNG files

    I installed IrfanView because I was having trouble creating PNG files with a transparent colour (suitable for use with Internet Explorer v6) with my current graphics editor (MS Image Composer). I found that if I copied an image from Image Composer and pasted it into IrfanView it appeared with a white background (the transparent area). I could then save the image as a PNG from IrfanView and it worked as expected.

    However...

    If I open the original image file in IrfanView directly, it behaves differently. Instead of the white background that I got when pasting from Image Composer, the transparent areas show as black. If I then save that image, it doesn't show as transparent in IE6.

    I have several files that I want to convert this way, and I'd really prefer not to go via Image Composer for each one. Presumably there's a property of the files that's being set (or lost) during copy/paste but not during file load. Can some kind soul tell me what I'd need to do to be able to change the image loaded from file so that it behaves as it does when pasting?

    #2
    When saving as PNG again, did you tick 'Save with transparent color' ?
    0.6180339887
    Rest In Peace, Sam!

    Comment


      #3
      Yes, and I was prompted to click on the background colour. In the case of the image that was pasted into IrfanView, the background was presented as white and the resultant save appeared transparent in the browser. In the case of the image that was loaded directly from file, the background was presented as black and the resultant save appeared with a black background in the browser.

      Comment


        #4
        When you paste, you don't paste transparency, so the background at the time is inherited. That is why your copy is white. You made the white transparent when you saved it in IrfanView. If you open a transparent file (with transparency display enabled), then the file shows transparent (i.e. the original color is not shown) and you see the background of the viewer (most likely black). To see the original color you would have to disable transparency display.

        Now, IE6 OTOH has a white background. Therefore, it becomes somewhat ambiguous what is going on when you have white in the image. Since, you say one image is black in IE6 and the other is white, that seems to suggest that transparency is actually not showing for either.

        I am not positive, but I think IE6 does not support 24-bit PNG with indexed transparency, like it doesn't support alpha transparency. It does though seem to support 8-bit PNG with indexed transparency, kind of like GIF. That may be your problem with the images. Maybe someone else can confirm this?

        Comment


          #5
          Sorry for the delay in responding, I don't seem to have requested e-mail notification so didn't notice your post.

          The web page in which I'm using the images is not white - it has a coloured image background. The black and white backgrounds I mentioned were the appearances in IrfanView, not in a browser. When viewed in IE6 the image that was pasted into IrfanView before saving are transparent, whereas those that were opened directly in IrfanView before saving are not.

          Comment


            #6
            Well, if your image is definitely showing transparency in the browser, then you most likely didn't set the transparency like Sam_Zen suggests. You say you did, but maybe it didn't take.

            To confirm transparency in a file (which doesn't depend on where the original source came from), set your background of IrfanView to something like gray. To switch between showing/not showing the file's transparency, enable/disable Options>Properties/Settings>Viewing>Show PNG/DDS/TGA alpha/transparent color. This does not affect the transparency in the file, only visualizes it.

            If the transparency is not there, then you'll need to go back and try to save the image again and set the transparent color. Hopefully verifying this time will show it correctly. If not, upload the file and we can try.

            Note: IrfanView does not retain transparency when you resave. You must reset it each time or it will be lost. When saving an image containing transparency and showing the transparency, the transparent color would become the background color usually, which makes verification difficult the next time, unless you change the background color of the viewer.
            Last edited by Skippybox; 02.09.2009, 07:05 PM.

            Comment


              #7
              Thanks for the suggestions. I'm not in a position to check it at the moment but will do so when I can and I'll post back.

              Comment

              Working...
              X