alpha

OpenGL ES 2.0 Alpha

旧时模样 提交于 2019-12-25 04:15:59
问题 I am trying to load a texture PNG ( exported by photoshop) and use it in OpenGL ES 2.0 in Android, but the solid color seems like transparent ( black circle in the png is totally black) I has been read that if you scale a png more than 50% that bug appear( I tested with scaling more and same so I supposed that is not the case) I also read that BitmapFactory dont read premultiplied alpha PNG ,I tryed another fuction that supposed that do the work but didnt work( maybe it was wrong) Any ways to

Change Alpha on Main Window - Cocoa

痞子三分冷 提交于 2019-12-24 21:30:16
问题 I want to know if I can slowly increase the alpha MainWindow when I open the app and when I close the app. I know it may involve timers, and things like that, but I never dealt with this kind of thing before. I need your help guys...! Kevin 回答1: Use NSViewAnimation. Despite the name, it works on windows as well as views. 回答2: [self setAlphaValue:0]; That'll set the alpha of the window. Just create an NSTimer that either adds or subtracts to bring the alpha up or down. The Value is an <#

Need help understanding Alpha Channels

人走茶凉 提交于 2019-12-24 17:15:09
问题 I have the RGB tuple of a pixel we'll call P. (255, 0, 0) is the color of P with the alpha channel at 1.0. With the alpha channel at 0.8, P's color becomes (255, 51, 51). How can I get the color of the pixel that is influencing P's color? 回答1: Let's start from the beginning. A pixel with alpha only makes sense when it is blended with something else. If you have an upper layer U with alpha and a lower layer L that is totally opaque, the equation is: P = (alpha * U) + ((1.0 - alpha) * L)

Video with alpha for Processing

北战南征 提交于 2019-12-24 17:07:55
问题 I am researching how to play alpha videos in processing to make augmented reality. What is the format and encoding needed to render video files with alpha channel? When I do this in Unity I use a special shader and video format so can use luma cut, whereas in the same video you put the white and black in one side (or up) and the color in the other side (or down), then the shader makes "the magic" and leaves the color over to cutted image. Here is a link to previous post: Video with alpha

File Format for Saving Video with alpha channel in iOS

孤者浪人 提交于 2019-12-24 12:42:09
问题 I am using AVFoundation to create a video and have added in an effect to clip the video so there is a clear background. What file format should I save this as to preserve the transparency in my iOS app. 回答1: AVAnimator is a library with which you can display video with an alpha channel on iOS, it is however not free to use for commercial products. I don't think it's natively possible. 来源: https://stackoverflow.com/questions/28258575/file-format-for-saving-video-with-alpha-channel-in-ios

How can I control the brightness of an Image?

我与影子孤独终老i 提交于 2019-12-24 12:29:29
问题 I have the following problem: I want to create a method to control the brightness of an Image. I think I have to convert it to a BufferedImage before. And if the Image has an alpha channel and I want to convert it with TYPE_INT_RGB the alpha pixels will be black. But it works fine with TYPE_INT_ARGB ... It doesn't work if the image doesn't have an alpha channel and I convert it with TYPE_INT_ARGB . Then not only the brightness changes, but also the color. When I make the image brighter it

java images with alpha channel without using buffered image

老子叫甜甜 提交于 2019-12-24 11:26:06
问题 im drawing a bunch of tiles on a Canvas , these tiles are represented by either Image s or BufferedImage s. i noticed that im getting millisecond draws with Image s but what i start using BufferedImage s for the tiles the frame time sky rockets to above 20ms. BufferedImage buffered = ImageIO.read(new File(fileName)); Image image = Toolkit.getDefaultToolkit().createImage(fileName); Both of these images support alpha channels. I would like to start using alpha capable Image 's for intermediary

How to render a texture with alpha?

百般思念 提交于 2019-12-24 10:37:16
问题 How to render a texture with alpha? I have a texture, and need to render it with different alpha values at different locations. Any way to do so? (My texture is GL_RGBA) If not possible to change alpha value on the fly, I have to create different textures for different alpha levels? 回答1: Your texture is GL_RGBA so it has a different alpha value for each texel. If you want to change the alpha value used for render, I can think of the following methods: Change the texture alpha values (not sure

UIView animated crossfade causes alpha to drop below 1.0?

微笑、不失礼 提交于 2019-12-24 08:35:06
问题 I'm crossfading between two views using UIView animation. I've noticed the following surprising fact: If I have (say) two identical views in an identical place, and I animate a cross fade between them (e.g. animate the alpha from 0.0 to 1.0 on one while going from 1.0 to 0.0 on the other, in the same animation), during the animation, the visible result arcs slightly below opaque during the animation-- this is a noticeable artifact and can be verified by putting some other view behind the

Emgu C# OpenCV: Make Color Black transparent

怎甘沉沦 提交于 2019-12-24 06:29:08
问题 I'm currently trying to implement a function with OpenCV which makes the color black of an image transparent. I used this thread as a guideline. Currently it is not working and I'm not sure if it is because of my transfer to C# or another mistake. public Image<Bgr, Byte> BlackTransparent(Image<Bgr, Byte> image) { Mat imageMat = image.Mat; Mat finalMat = new Mat(imageMat.Rows, imageMat.Cols, Emgu.CV.CvEnum.DepthType.Cv8U, 4); Mat tmp = new Mat(imageMat.Rows, imageMat.Cols, Emgu.CV.CvEnum