Transparent PNG in PIL turns out not to be transparent

I think what you want to use is the paste mask argument. see the docs, (scroll down to paste) from PIL import Image img = Image.open(basefile) layer = Image.open(layerfile) # this file is the transparent one print layer.mode # RGBA img.paste(layer, (xoff, yoff), mask=layer) # the transparancy layer will be used as the mask img.save(outfile)

Make overlay background click-through-able [duplicate]

I’ve fixed your problem by adding pointer-events: none; to the absolute block. body { margin: 0; padding-left: 10px; font: 20px Arial, sans-serif; line-height: 30px; } a:hover { color: red; } #overlay-blocking, #overlay-passing{ position: absolute; height: 30px; width: 10em; left: 0; } #overlay-blocking { top: 30px; background: rgba(0,100,0, .2); pointer-events: none; } #overlay-passing { top: 0; … Read more

How do I animate a background color to transparent in jQuery?

Transparent isn’t really a color. So, you can’t animate to it. You might be able to achieve the effect you’re looking for by using a separate element for the background, and animating the opacity though. Example: HTML: <body style=”background-color:yellow”> <!– by default, “see through” to parent’s background color –> <div id=”container”> Lorem ipsum dolor sit … Read more

Iframe transparent background

I’ve used this creating an IFrame through Javascript and it worked for me: // IFrame points to the IFrame element, obviously IFrame.src=”https://stackoverflow.com/questions/1234127/about: blank”; IFrame.style.backgroundColor = “transparent”; IFrame.frameBorder = “0”; IFrame.allowTransparency=”true”; Not sure if it makes any difference, but I set those properties before adding the IFrame to the DOM. After adding it to the DOM, … Read more