alpha
ios overlaying alpha channel video on another video
You mention that you have looked at AVAnimator, did you download the KittyBoom example project and try it out? The specifics of how it works are detailed in this post. One thing to note is that when you build and run on the device, you need to turn Debug mode off otherwise it will not … Read more
Android and setting alpha for (image) view alpha
It’s easier than the other response. There is an xml value alpha that takes double values. android:alpha=”0.0″ thats invisible android:alpha=”0.5″ see-through android:alpha=”1.0″ full visible That’s how it works.
Set BufferedImage alpha mask in Java
I’m too late with this answer, but maybe it is of use for someone anyway. This is a simpler and more efficient version of Michael Myers’ method: public void applyGrayscaleMaskToAlpha(BufferedImage image, BufferedImage mask) { int width = image.getWidth(); int height = image.getHeight(); int[] imagePixels = image.getRGB(0, 0, width, height, null, 0, width); int[] maskPixels = … Read more
SVG fill color transparency / alpha?
You use an addtional attribute; fill-opacity: This attribute takes a decimal number between 0.0 and 1.0, inclusive; where 0.0 is completely transparent. For example: <rect … fill=”#044B94″ fill-opacity=”0.4″/> Additionally you have the following: stroke-opacity attribute for the stroke opacity for the entire object
How to change the opacity (alpha, transparency) of an element in a canvas element?
I am also looking for an answer to this question, (to clarify, I want to be able to draw an image with user defined opacity such as how you can draw shapes with opacity) if you draw with primitive shapes you can set fill and stroke color with alpha to define the transparency. As far … Read more
Transparent background with three.js
If you want a transparent background in three.js, you need pass in the alpha parameter to the WebGLRenderer constructor. var renderer = new THREE.WebGLRenderer( { alpha: true } ); You can leave the clear color at the default value. renderer.setClearColor( 0x000000, 0 ); // the default three.js r.71
How to set the opacity/alpha of a UIImage?
I just needed to do this, but thought Steven’s solution would be slow. This should hopefully use graphics HW. Create a category on UIImage: – (UIImage *)imageByApplyingAlpha:(CGFloat) alpha { UIGraphicsBeginImageContextWithOptions(self.size, NO, 0.0f); CGContextRef ctx = UIGraphicsGetCurrentContext(); CGRect area = CGRectMake(0, 0, self.size.width, self.size.height); CGContextScaleCTM(ctx, 1, -1); CGContextTranslateCTM(ctx, 0, -area.size.height); CGContextSetBlendMode(ctx, kCGBlendModeMultiply); CGContextSetAlpha(ctx, alpha); CGContextDrawImage(ctx, area, … Read more
How to set opacity of background colour of graph with Matplotlib
If you just want the entire background for both the figure and the axes to be transparent, you can simply specify transparent=True when saving the figure with fig.savefig. e.g.: import matplotlib.pyplot as plt fig = plt.figure() plt.plot(range(10)) fig.savefig(‘temp.png’, transparent=True) If you want more fine-grained control, you can simply set the facecolor and/or alpha values for … Read more
How to change a bitmap’s opacity?
As far as I know, opacity or other color filters can’t be set on the Bitmap itself. You will need to set the alpha when you use the image: If you’re using ImageView, there is ImageView.setAlpha(). If you’re using a Canvas, then you need to use Paint.setAlpha(): Paint paint = new Paint(); paint.setAlpha(100); canvas.drawBitmap(bitmap, src, … Read more