alpha

VB .NET picture GetPixel & SetPixel: Include alpha?

时光总嘲笑我的痴心妄想 提交于 2019-12-11 09:26:59
问题 I am trying to use GetPixel and SetPixel to copy the contents of one picture to another (I know there are other methods to do so, but there are reasons I want to try this ;D) Anyway, the pictures are .png images, so they include transparency settings. But for some reason, it seems like when I use GetPixel & SetPixel to put one image over another, it seems the second image completely replaces the other one. I mean, it seems the transparency settings are not respected when I use GetPixel &

ios 7 - transparency in IB not working correctly? setting transparency programmatically also isn't working?

允我心安 提交于 2019-12-11 08:55:37
问题 I have created two UIViewControllers in IB. PROBLEM 1: I can't make the 2. VC transparent. I have read a lot of stackOverFlow solutions but nothing seems to work in my case. I have tried the following setup in IB both in my current project and in this simple project and something strange occurs (IB,for 2.VC): Setting the alpha value below 0,5 Setting opaque to "checked" Setting the background color to "black" https://imageshack.com/i/kqdXWk9Jp The second VC gets pushed when I click "GO TO

What is the formula for extracting the src from a calculated blendmode?

一个人想着一个人 提交于 2019-12-11 08:47:58
问题 How does one go about using a alpha blending formula to achieve the src rgb color from the resultant of the 2 blended together 回答1: Well, you can just reorder the alpha blending equation Value = (1 − α ) · Value 0 + α · Value 1 However, there are four variables in that equation: α , Value , Value 0 and Value 1 . You need to know three of them to calculate the fourth. So in your case you know the resulting color, Value , the α and maybe Value 0 . You can then reorder the equation as follows: −

Android: Make a Video transparent

半腔热情 提交于 2019-12-11 06:19:38
问题 i'm trying to make a video, played in a videoview transparent. As written in the documentation the videoview should have a method "setAlpha" but my Eclipse says there is no such method?!? 回答1: This method requires Android SDK 11 (Android 3.0 Honeycomb). So you shouldn't use this method if you want to use this app on Android 2.X devices. 来源: https://stackoverflow.com/questions/5445813/android-make-a-video-transparent

Can I create a totally transparent UIView that receives touches?

坚强是说给别人听的谎言 提交于 2019-12-11 06:08:54
问题 I want to create a totally transparent UIView overlay (and it has subviews) to receives touches. I could set the alpha to a low value (like 0.02) to get an approximate effect. But I wonder is it possible for a alpha == 0 UIView to receives touches, through other UIView configs? 回答1: You can accomplish this by overriding the hitTest:withEvent: method in the class of your fully transparent view, like: - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { return self; } The

Set alpha of some pixels to zero

為{幸葍}努か 提交于 2019-12-11 04:53:18
问题 Let's say I have 2 images, one on top of the other. I want to set a portion of the top image's pixel's alpha values to zero so I get this effect illustrated below: The brown is the top image, and the blue water is the bottom image. Ultimately what I'm going to do is have the alpha channel of the top image's pixels change to zero as the user touches the iPad screen so they can essentially draw with their fingertip and have the blue water image appear. I have a function that can examine the

iPhone - UIImage mask and CopyImageAndAddAlphaChannel function

与世无争的帅哥 提交于 2019-12-11 04:28:33
问题 I am trying to create a jigsaw puzzle and I need to mask the UIImages to obtain the puzzle pieces. I don't understand how can I mask a JPG picture because as I understand it doesn't have an alpha channel. Can anyone help me with this? The JPGs are on an online server and there is no way to download them as PNG. And one more thing, I can’t find this function anywhere on the Apple documentation: “CopyImageAndAddAlphaChannel”. Does it even exist. I found a few references on some forums but

wxPython - drawing on transparent/alpha background (for custom widgets/panels)

蹲街弑〆低调 提交于 2019-12-11 03:57:32
问题 I'm learning wxPython on Ubuntu Linux - and I would like to define my own widget, which is basically a line, which I'd like to move around the window.. I'm getting somewhere, but the problem is that I cannot get the 'widget' to 'draw' on a transparent background; best I can get is something like this ( the yellow line should be an independent widget with a transparent background - but the background there is black with noise ): The code I came up with is below. I don't want the whole window

OpenCV : Transparent area of imported .png file is now white

折月煮酒 提交于 2019-12-11 03:38:45
问题 I'm trying to develop a small and simplistic webcam-controlled game, where the user moves a figure on the x-axis by tracking a lighting source with the webcam (flashlight eg.) So far my code generates a target object every couple of seconds at a random location in the picture. That object is stored as a Mat via Mat target = imread("target.png"); In order to paint the object onto the background image, I'm using bgClear.copyTo(temp); for(int i = targetX; i < target.cols + targetX; i++){ for(int

How to programmatically detect if a bitmap has alpha channel?

我怕爱的太早我们不能终老 提交于 2019-12-11 03:32:05
问题 As subject. Preferibly using C code. 回答1: =========MFC++ version private: static Boolean __gc* BitmapHasAlpha(BitmapData __gc* bmpData) { if ((bmpData->PixelFormat != PixelFormat::Format32bppArgb) && (bmpData->PixelFormat != PixelFormat::Format32bppRgb)) { return false; } for (Int32 __gc* i = 0; (i < bmpData->Height); i++) { Int32 __gc* num2 = (i * bmpData->Stride); for (Int32 __gc* j = 3; (j < (bmpData->Width * 4)); j += 4) { Byte __gc** numPtr = *static_cast<__box Byte __gc***>(((bmpData-