alpha

Use FFmpeg to generate a movie with alpha channel from separate video and fill movies?

為{幸葍}努か 提交于 2019-12-12 04:59:37
问题 I have two movies: input_v.mp4 and input_k.mp4. input_v is the video fill, input_k is a black and white matte for keying. I want to use FFmpeg to create output.mov in the Avid DNXHD codec, with input_v as the fill (RGB) video and the alpha (A) built from the luma values of input_k. Is this possible? 回答1: If your looking for a movie format showing as a matte effect in Avid then this might work: ffmpeg -i input_v.mp4 -i input_k.mp4 -filter_complex "[0:v][1:v]alphamerge" -shortest -c:v qtrle -an

setting Alpha for UIView that is a subview of UIScrollVIew very slow

杀马特。学长 韩版系。学妹 提交于 2019-12-12 04:53:38
问题 I have UIScrollView that contains several UIView when I try to setAlpha: for one of the UIView , I get 1.5 second delay till the UIView alpha is set. Here is the code below setContentOffset does run before the setAlpha: although the setAlpha: is written before in code -(void)setAlphaForIndex:(int)Index{ for (UIView *v in imgScroll.subviews){ if (v.tag == Index) { [v setAlpha:0.6]; if (![self checkIfImageInScrollRange:Index]){ if (v.tag < 5) [imgScroll setContentOffset:CGPointMake(0, 0)

newbie keeps losing alpha values in canvas

岁酱吖の 提交于 2019-12-12 03:49:08
问题 I'm probably doing something boneheaded here but I'm having difficulties getting alpha values to cooperate in Canvas. I'm trying to sample an opaque color from a spot on the canvas, make it more transparent, and lay it down in another spot -- but the alpha part doesn't seem to be working. Stripped down it goes sort of like this (condensed from functions strewn across the script): p = ground.ctx.getImageData(loc.x, loc.y, 1, 1).data; col = {R: p[0], G: p[1], B: p[2], a: p[3]}; col.a = col.a -

Why does setAlpha() act on all my buttons whilst setImageResource() acts on just one button?

二次信任 提交于 2019-12-11 16:08:14
问题 At the moment my buttons do not work. The first two times any are pressed all buttons are influenced rather than just the one that has been pressed. Swap: seatButton[i].setAlpha(255); For: seatButton[i].setImageResource(0x7f020007) And my code works! Only the button I press is effected. Why? @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); table = new Table(); //Creates Table seatButton = new ImageButton[10]; /

Unable to change navigation bar opacity

一曲冷凌霜 提交于 2019-12-11 13:13:55
问题 I am trying to style my app in the following way, however i am unable to get my navigation bar to reach this level of opacity I use the following code to style the navigation bar: unc application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { UINavigationBar.appearance().barTintColor = UIColor(red: 1, green: 1, blue: 1, alpha: 0.1) UINavigationBar.appearance().tintColor = UIColor.whiteColor() UINavigationBar.appearance()

OpenGL ReadPixels (Screenshot) Alpha

…衆ロ難τιáo~ 提交于 2019-12-11 12:44:47
问题 I'm using a Tile Rendering (using glReadPixels) setup to take screenshots of a scene. My output looks correct: But looking at the alpha channel the pixels are still transparent even if the transparent texture is rendered on top of an opaque texture. In particular the "inside" of the car should be completely opaque where we see the ceiling, but partially transparent when going through the back windows. Is there a method for testing the alpha component of each texture at a pixel, not just the

LWJGL png texture transparency (textureColour.a white color instead of black)

南笙酒味 提交于 2019-12-11 12:27:50
问题 I have grass models textured by PNG pictures. And i get white background color instead of black, which I want to. Why it is so and what should i do to fix that? I am using LWJGL 3 and PNGDecoder.jar Texture loader code: public int loadTexture(String fileName) { ByteBuffer buf = null; int tWidth = 0; int tHeight = 0; try { // Open the PNG file as an InputStream InputStream in = new FileInputStream("res/" + fileName + ".png"); // Link the PNG decoder to this stream PNGDecoder decoder = new

Android Graphics: Changing the alpha of just an image (not the background)

假装没事ソ 提交于 2019-12-11 12:06:30
问题 I am a newbie to graphics in Android (although I am pretty well-versed with Android programming itself). I am trying to display a "lightbulb" in my app. Based on some values, I would like to change the "brightness" of the lightbulb. I used a PNG image for this. <View android:id="@+id/view2" android:layout_width="59dp" android:layout_height="65dp" android:background="@drawable/lightbulb" /> And, the code is this: final View normalView = findViewById(R.id.view2); //Where I need to set the alpha

Delphi 6 support for toolbar and menu icons with alpha channel transparency

纵饮孤独 提交于 2019-12-11 11:49:19
问题 We have a legacy application developed in Delphi 6 (yes, I know this is an ancient IDE now), which we are trying to update to look more modern. We have added in a Manifest and now have it using version 6 Windows controls and taking on the Windows Visual Theme (all good). However, when trying to replace the old 4 bit toolbar and menu icons with True Colour with Alpha Channel (32 bit) transparency we have hit a problem. It appears that Delphi 6 only supports transparency based on the bottom

Changing the alpha inside UIScrollView

点点圈 提交于 2019-12-11 11:16:46
问题 I was trying to achieve the effect of having my text fade in and out to show there is more data in the UIScrollView in this post: UIScrollView, showing that there is more data by fading out text I could not get the CAGradientLayer to look right since my background isn't a simple black and white background and I couldn't get it to match and make it look like the text is fading. So I thought I'd try setting the alpha property inside the UIScrollView, or the UILabel's alpha inside the