14

On Windows 11, is there a way to confirm if a background is transparent on a PNG file without having to install a photo editing program like GIMP or Photoshop?

6 Answers6

24

As an alternative to copying to the desktop, you can just click on or hover over the image in its current folder. For this to work you need the folder view/layout to be one which shows thumbnails, e.g. "Large icons".

Simply click on or hover over the file, and explorer will add a tint to the background. If you can see the tint through the image, then it has a transparent background.

Unselected Selected
Light Mode Unselected images on white bakground Selecting images changes background colour in light mode
Dark Mode Unselected images on dark background Selected images changes background colour in dark mode too
14

The simplest, least technical way to decide is to drag it to the desktop. If you can see the desktop through it, it has transparency. If it's in a white square, it doesn't.

Enter image description here

Tetsujin
  • 50,917
3

Open the image in Chrome, for example:

  • Right click on any image on a web page and click Open image in new tab
  • Drag the image into an open Chrome window

Now right click on the image and click Inspect.

Make sure the <img> element is selected in Elements pane.

In Styles pane, element.style section, change the background-color using the color picker. If the background color of the image changes as you choose the color then you have a transparent PNG/WEBP/GIF.

Demonstration

Sample page with a transparent image

1

Powershell is included with windows! :-) It allows you to look at the details of your image file. One item , the pixelformat, shows how many bits per pixel the image stores and also whether an Alpha channel, used for transparency, is present. The Alpha channel is displayed as the Argb at the end. This script will look for .png files in your home folder and show their full name and their Pixelformat

    $pngs = get-childitem $env:USERPROFILE\*.png -recurse
    add-type -AssemblyName system.drawing
    foreach($png in $pngs){
        $image = [System.Drawing.Image]::FromFile($png)
        write-output "Image $png has pixelformat ($image.pixelformat.tostring())"

}

0

Unfortunately, Tardisrepairman's method just doesn't work and I don't know enough about Powershell to figure out why. It just tells me that every file is "pixelformat (System.Drawing.Bitmap.pixelformat.tostring())". Which is a bit odd because Bitmap wasn't in there in the first place. Maybe because I'm using Win10, not 11?

Sadly I've lost track of my old account which had a reasonable amount of rep on it, and have had to restart from zero so I'm not yet allowed to comment directly.

The other methods may work but really what I need personally and was looking for when search landed me here is something that will just list off whether or not each file has transparency. Is there any tool or program that will just tell you this info as part of it somehow? An image thumbnailing/cataloguing app perhaps? (I have tried Irfanview Thumbnails and found it lacking in this regard). Or even just the Open File dialogue of some particular image editor? (Hopefully not Photoshop as I ain't paying for that, but I'm happy to use GIMP)...

Context - I was trying to regain a bit of space by running OptiPNG on all my PNGs from Irfanview itself, but realised that the way the program handles transparency is not at all clear, and I don't know whether it will preserve or annihilate what's already there. It looks like the only options in the save menu are to add a transparent colour based on some particular criteria, which is absolutely not what I need... If nothing else I need to find something within the list that has transparency (there will certainly be some with either a transparent colour or an alpha channel, but there's thousands of the things...) so I can test it and see what happens.

It seems rather weird that there's no way to just ... show this, somehow? I can at least get Explorer to show me the dimensions and bitdepth of an image, after all. The presence of Alpha or Transparency should be just another quality like that, as suggested by TardisRepairman's reply, but I'm stuck at the point of extracting it. Tried messing with the script to correct any possible glaring errors with it but all I get back are cryptic error messages that are WAY above my current level.

0
  1. Transparent may be not only “background”, but an arbitrary pixel. For example, only one pixel.

  2. Transparent pixel not need be fully transparent, but only partially transparent (translucent), too, with different level of translucency.

    Applying a semi-transparent image to 1. a black background (left), 2. some image (right):

    enter image description here

  3. Operating system is far from to provide specific information about all possible countlessly document types (as your PNG images), so it is somehow naive to suppose that you will be satisfied with info from your operating system.

You don't need to install huge or expensive photo editors like GIMP or Adobe Photoshop.

  1. You may use on-line tools, like the free Image transparency checker:

    Show only fully transparent pixels (as black):

    enter image description here


    Show semi-transparent (translucent) pixels, too (as cyan), with amount of translucency:

    enter image description here


  2. You may install and use some lightweight and freeware image viewer, as Imagine or IrfanView.

    enter image description here

Giacomo1968
  • 58,727
MarianD
  • 2,726