alpha-transparency

Semi-Transparent TextureViews not working

这一生的挚爱 提交于 2019-12-10 17:28:58
问题 I cannot change the transparency of a TextureView by setAlpha method to maske it semi-transparent as it is promised by the android SDK. For example mTextureView.setAlpha(0.5f) does not have any effect. 回答1: You need to make sure and setOpaque(false). From the docs: public void setOpaque (boolean opaque) Added in API level 14 Indicates whether the content of this TextureView is opaque. The content is assumed to be opaque by default. 回答2: The solution I used to make it happen was to wrap the

Issue in checking UIImage have alpha (Transparent) color or not

一曲冷凌霜 提交于 2019-12-10 15:39:47
问题 I'm checking that image have transparent area (alpha) or not. Bashed on that I have to change the color of UIImage I have implement the below method to check the image have alpha or not. - (BOOL) checkAlpha : (UIImage*) image { for(int x = 0; x < image.size.width ; x++) { for(int y = 0; y < image.size. height; y++) { CFDataRef pixelData = CGDataProviderCopyData(CGImageGetDataProvider(image.CGImage)); const UInt8* data = CFDataGetBytePtr(pixelData); int pixelInfo = ((image.size.width * y) + x

How to enable Alpha leveling in TImage graphic?

偶尔善良 提交于 2019-12-10 12:12:30
问题 I have TImage with a preloaded Bitmap (by PNGImage unit) with an Alpha Channel: The subject is the Great Green Dino. I wanted to be able to change its Alpha Level in runtime, to any value in the range. Like 127 and he would look like this: Following the answer to another similar question I almost felt in the skin it would work. But that was the result to Alpha Level 0 for example: So, my question. Could someone know how to improve the answer's routine? Or know another way to achieve the

Keep alpha-transparency of a video through HDMI

我的梦境 提交于 2019-12-10 11:27:19
问题 The scenario I'm dealing with is actually as follow: I need to get the screen generated by OpenGL and send it through HDMI to a FPGA component while keeping the alpha channel. But right now the data that is being sent through HDMI is only RGB (24bit without alpha channel) So i need a way to force sending the Alpha bits through this port somehow. See image: http://i.imgur.com/hhlcbb9.jpg One solution i could think of is to convert the screen buffer from RGBA mode to RGB while mixing the Alpha

How to detect a browser that dosen't render .png transparency

痞子三分冷 提交于 2019-12-10 10:12:07
问题 I have this code that render's a image acording to the day of the week. But in IE6 and lower and probably some other browsers it won't render png opacity. So I want to change it a litle so that it will detect the browser's that don't render alpha transparency and tell them to load this image instead: "img/horarios2.png". Ive tried making it so that it would rule out IE6 and lower that are known for not rendering, but then I thinking about all the other browsers that I probably don't know

Transparent webm video displays solid background color on Chrome for Android 68 on android 9.0

风流意气都作罢 提交于 2019-12-09 23:51:57
问题 I have simple page with a webm video with transparent background. It works well on desktop. It works well on Chrome for Android version 66 on my android phone running android 9.0 too. But after upgrading to Chrome for Android version 68, the video displays solid background color. I checked the console and no error or warning found. Chrome 66: ]2]2 Chrome 68: I tested on Chrome for Android version 68 on other phones which running Android 7 and it works well. Does anyone know why this happens

Tkinter see through window not affected by mouse clicks

我是研究僧i 提交于 2019-12-09 03:31:01
问题 I am currently controlling a game with python by sending mouse and keystroke commands. What I am looking to do is have a transparent Tkinter window lay overtop of the game to provide some information such as mouse location and pixel color. I am familiar with changing the window's alpha attribute to make it transparent but have no idea how to always keep that window in front and have mouse clicks pass through it. My current method of controlling the game involves taking screenshots in certain

CGBitmapInfo alpha mask after swift 2.0

梦想的初衷 提交于 2019-12-08 14:51:57
问题 I am using a library from this github repo https://github.com/Haneke/HanekeSwift to cache the images that are being downloaded from a server. After updating to swift 2.0 everything is messed up. I've been able to fix everything but this function: func hnk_decompressedImage() -> UIImage! { let originalImageRef = self.CGImage let originalBitmapInfo = CGImageGetBitmapInfo(originalImageRef) let alphaInfo = CGImageGetAlphaInfo(originalImageRef) // See: http://stackoverflow.com/questions/23723564

2 opposite opacity values dont produce opaque color

帅比萌擦擦* 提交于 2019-12-08 02:51:43
问题 I want to produce an opaque solid color with 2 opacity values of that color. eg: 0.5 opacity black color rectangle when placed above same 0.5 opacity black color doesn't give me same result as an opaque (opacity 1) black color. I have tried this with different range of opacity values and found something like 0.5 & 0.8 produce 0.9 opacity black color, 0.4 & 0.82 and so on. These are not accurate values. What is the exact formula for calculating exactly opposite opacity values? 回答1: If two

32-bit images on ImageList

南楼画角 提交于 2019-12-07 19:21:33
问题 I've got the following image: I'm reading it from resources, putting into ImageList and then reading it from ImageList to draw on my control's surface. But when I'm doing that, image seems to loose information about alpha channel: Here are all relevant pieces of code: Program.cs Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); MainForm.cs ilFilters = new ImageList() { ColorDepth = ColorDepth.Depth32Bit, ImageSize = new Size(16, 16) }; // (...) if (info