transparency

Numpy create an empty alpha image

我只是一个虾纸丫 提交于 2021-02-05 08:12:33
问题 I wanted to create a blank alpha image to parse some data from py-opencv and save it on an transparent background png file. I tried : blank_image = np.zeros((H,W,4), np.uint8) and blank_image = np.full((H, W, 4) , (0, 0, 0, 0), np.uint8) (H and W are Height and Width) Both still render a black background instead of a transparent one. how to get a blank alpha transparent image? Thanks in advance :) Edits: as mentioned by Mark Setchell: you need to specify the alpha channel on other colors

Numpy create an empty alpha image

风流意气都作罢 提交于 2021-02-05 08:11:32
问题 I wanted to create a blank alpha image to parse some data from py-opencv and save it on an transparent background png file. I tried : blank_image = np.zeros((H,W,4), np.uint8) and blank_image = np.full((H, W, 4) , (0, 0, 0, 0), np.uint8) (H and W are Height and Width) Both still render a black background instead of a transparent one. how to get a blank alpha transparent image? Thanks in advance :) Edits: as mentioned by Mark Setchell: you need to specify the alpha channel on other colors

Numpy create an empty alpha image

旧时模样 提交于 2021-02-05 08:11:26
问题 I wanted to create a blank alpha image to parse some data from py-opencv and save it on an transparent background png file. I tried : blank_image = np.zeros((H,W,4), np.uint8) and blank_image = np.full((H, W, 4) , (0, 0, 0, 0), np.uint8) (H and W are Height and Width) Both still render a black background instead of a transparent one. how to get a blank alpha transparent image? Thanks in advance :) Edits: as mentioned by Mark Setchell: you need to specify the alpha channel on other colors

SetLayeredWindowAttributes to make a window transparent is only working part of the time

时光怂恿深爱的人放手 提交于 2021-02-05 07:10:34
问题 I'm trying to make a window transparent so that only part of its contents are visible, I've tried using SetLayeredWindowAttributes to make this happen, this made the window transparent as I wanted, however it only works that way when part of the windows picture is outside of the visible area of my desktop. For some reason whenever the window is fully on screen it re-draws its black background (the color I use for transparency that's meant not to be seen.) Here is a video example of the

C# Windows Forms semi-opacity

匆匆过客 提交于 2021-02-05 06:44:24
问题 I have already read many topics about opacity/transparency on Windows Forms in C#, but it's not the effect I would like to get. I would like Form to be 100% transparent, but transparency of the Panel was adjustable, and the transparency effect was transferred to the elements behind Form (Windows desktop, web browser e.t.c.). The attached photo shows the effect that I would like to get (I made them in a graphic program). I will be grateful for your help. 回答1: OP: If there is any other language

PHP/GD: How to handle jpg transparency?

点点圈 提交于 2021-01-29 07:16:25
问题 JPG doesn't support transparency. Yet you can export an image with transparent areas from for example GIMP. In that case the transparent areas will show either black or white in your browser, Windows explorer or other software. I regularly receive such files that I need to process and provide in several smaller formats. I do that with some PHP script using the GD library. The problem is that it is unpredictable whether those areas will turn out black or white in the processed versions. Even

transparent window using Windows Composition engine in c++

ⅰ亾dé卋堺 提交于 2021-01-28 06:21:56
问题 First, I want to say that I am a newbie in direct2d usage. My final purpose is to have per pixel transparent window. I have found this nice article : https://docs.microsoft.com/en-us/archive/msdn-magazine/2014/june/windows-with-c-high-performance-window-layering-using-the-windows-composition-engine and it seems that it answers my question. Before writing my per-pixel transparent window, I just tried to test the code in that link. But when I run the program, the disk that should be displayed

WebGL z-buffer artifacts?

会有一股神秘感。 提交于 2021-01-27 17:31:26
问题 We are working on a Three.js based WebGL project, and have trouble understanding how transparency is handled in WebGL. The image shows a doublesided surface drawn with alpha = 0.7, which behaves correctly on its right side. However closer to the middle strange artifacts appear, and on the left side the transparency does not seem to work at all. http://emilaxelsson.se/sandbox/vis1/alpha.png The problem can also be seen here: http://emilaxelsson.se/sandbox/vis1/ Has anyone seen anything similar

Black background for three.js sprites with depthTest true

放肆的年华 提交于 2020-12-11 08:52:34
问题 I have been experimenting with converting the custom attribute BufferGeometry example (https://threejs.org/examples/webgl_buffergeometry_custom_attributes_particles.html) into a fly through animation and I find that the sprites have dark backgrounds (and those that I create myself as well) if depthTest is set to true. See the image. The sprite in the custom attribute example has a transparent background but this appears to be ignored when it is rendered if depthTest is set to true. I have

Black background for three.js sprites with depthTest true

↘锁芯ラ 提交于 2020-12-11 08:47:05
问题 I have been experimenting with converting the custom attribute BufferGeometry example (https://threejs.org/examples/webgl_buffergeometry_custom_attributes_particles.html) into a fly through animation and I find that the sprites have dark backgrounds (and those that I create myself as well) if depthTest is set to true. See the image. The sprite in the custom attribute example has a transparent background but this appears to be ignored when it is rendered if depthTest is set to true. I have